Appropedia:Semantic MediaWiki
Appropedia uses Semantic MediaWiki (SMW) to store structured data in wiki pages and then query that data to produce dynamic elements like lists, maps, tables and more.
Quickstart[edit | edit source]
Suppose you have a bunch of pages and you want to store the date on which each page was created. So, you edit each page and add the following in-text annotation anywhere on the page:
[[Date::2022-04-20]]
This will set the Property:Date to the value "2022-04-20" for the current page. Once you've done this to several pages, you can add the following inline query anywhere on Appropedia and it will output an unordered list (<ul>) of 5 random pages from 2022:
{{#ask: [[Date::2022]] | format = ul | order = random | limit = 5 }}
You can complicate such queries endlessly with printout statements, result formats, search operators, subqueries and more.
But filling Appropedia with in-text annotations like [[Date::2022-04-20]]
would be confusing and inconvenient, so in-text annotations are always hidden behind templates such as Template:Project data.
So now that you know the basics, hack away!
Property naming[edit | edit source]
- Properties should be named in the most simple and intuitive way possible
- Properties that accept multiple values should be named in plural (e.g. Property:Keywords)
- Properties that refer to objects other than pages should prefix the relevant type of object when there's a conflict with a page property (e.g. Property:Project authors and Property:Authors)
- Appropedia does not follow the Semantic MediaWiki property naming suggestions of naming properties as verb phrases (e.g. Property:Has author). The reason is that the problem it tries to solve almost never happens in Appropedia and when it does, it can be solved in other ways (e.g. Property:Contributions as the converse of Property:Authors)
See also[edit | edit source]
- Special:Properties - All existing semantic properties on Appropedia
- Special:Browse - Semantic data of any content page on Appropedia
- Special:Ask - Try some queries
- Category:Semantic templates - All templates that store or query semantic data
- Semantic REST API - Semantic endpoint of the Appropedia REST API
- https://www.semantic-mediawiki.org - Semantic MediaWiki homepage