Parsing wiki information
Posted: Sat Aug 22, 2020 7:03 pm
I've been working on a tool to automatically convert the Factorio Lua data into a JSON format more reasonable for other tooling. To this end, I'm looking at parsing the Wiki data to automatically write the parser [1]. One thing I've noticed is that the semantic mediawiki information for the prototype definitions don't have the default information. The template for parsing a file only adds information on the name, type, and optionality:
But there's no inclusion of the default value (which would be {{{3}}} in wiki terms). Could this be added?
[1] So it's kind of like a compiler compiler compiler. Don't you love getting all meta?
Code: Select all
|Prototype property name={{{1}}}
|Prototype property type={{{2}}}
|Prototype property optional={{{optional|false}}}
|Prototype property pagename={{FULLPAGENAME}}
[1] So it's kind of like a compiler compiler compiler. Don't you love getting all meta?