Hi,
The meta query siteinfo allows to retrieve a list of magic words with basic information about them (aliases) [1]. Is there any way to retrieve more information about them, especially how they are supposed to be used: which ones should be used with {{#...}}, which ones are image parameters, ...
That would help a lot to code an external parser for wikitext.
Thanks in advance Nico
[1] https://fr.wikipedia.org/w/api.php?continue=&siprop=magicwords&actio...
On Mon, Jun 15, 2015 at 3:26 PM, Nicolas Vervelle nvervelle@gmail.com wrote:
which ones should be used with {{#...}},
That's not actually a property of the magic word, it's a property of the function hook registration. Although I see siprop=functionhooks doesn't return that information either..
which ones are image parameters,
That's not a property of the magic word either. It's just whether the image-handling code references that magic word when it's parsing its parameters.
...
???
On Mon, Jun 15, 2015 at 9:37 PM, Brad Jorsch (Anomie) <bjorsch@wikimedia.org
wrote:
On Mon, Jun 15, 2015 at 3:26 PM, Nicolas Vervelle nvervelle@gmail.com wrote:
which ones should be used with {{#...}},
That's not actually a property of the magic word, it's a property of the function hook registration. Although I see siprop=functionhooks doesn't return that information either..
which ones are image parameters,
That's not a property of the magic word either. It's just whether the image-handling code references that magic word when it's parsing its parameters.
Too bad, that would have helped me for a few edge cases with WPCleaner's internal parser...
Nico
mediawiki-api@lists.wikimedia.org