I think I sent this to the wrong address initially, here it is again (sorry if I'm just getting confused),
Dan. ---------- Forwarded message ---------- From: Dan Bolser <[email protected]> Date: 1 October 2011 10:37 Subject: API for Extension:ExpandTemplates? To: "[email protected]" <[email protected]> Hi, Can I get the XML parse tree from the MW API using Extension:ExpandTemplates? http://www.mediawiki.org/wiki/Extension:ExpandTemplates Would this ever be core functionality? In general, how should an extension extend the API, and could this be done for Extension:ExpandTemplates? I think it would be very useful for third party client applications to get programmatic access to the MW parse tree (for convenient high level page manipulation, such as trivially checking for a specific value of a specific field of a specific template and updating that template to add a new field, or counting the length of a list in a specific section, etc., etc.) I've been trying to implement such a tool in Perl, but of course, my template parser doesn't (yet) fully agree with the MW template parser, and the latter may change in future, requiring me to constantly maintain my Perl parser. Such an API extension would mean I could just get access to to what I need in Perl via the API. Here is a link to the stuff I've done in Perl in case anyone is interested (constantly changing these days): https://github.com/dbolser/MediaWiki--/tree/master/local-lib/lib/perl5/MediaWiki (Note, API.pm isn't my work, and I'll remove it from that location soon). Cheers, Dan. _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
