An extension for the (Semantic) Media Wiki. It parses text in the OTTR template language and produces code in Media Wiki Syntax. Triples are represented as subobjects.
More information about the extension: https://www.mediawiki.org/wiki/Extension:OttrParser.
The help page for wiki usage: https://www.mediawiki.org/wiki/Help:Extension:OttrParser.
See Media Wiki page of the extension: Install Instructions.
The OTTR-Relevant-Pages.xml contains the data for the relevant pages and templates, that are part of the extension. Import them via the Special Page Import. (Special:Import)
The extension uses the includes/Hooks.php. It calls the python script printOttrInSmw.py. The script parses the text in the passed file and the Listener (OTTRToSMWConverter.py) builds class objects (from the OTTRClassesForSMW.py) related to the parsed text. The SMWGenerator.py starts the generation of the final (Semantic) MediaWiki code based on the class objects and prints the result to the terminal. The Hook File reads the terminal output and returns the output to the media wiki page (with some additional information, e.g. the input text and wiki code in pre html-tags).
In the Settings.py you can add your namespaces, that are used in the automated forms, for requested arguments with the type restriction ottr:IRI.
- currently, it does not add new namespace ids to the wiki