[email protected] schreef: > Isn't there any way via the API to generate the same output as Special:Export? > > What query string can generate the same output as dumpBackup.php --current? > > OK, just for all pages in one Namespace. > > OK, just for all pages matching some prefix string. Or just for even > one page. > You can't generate the same output as dumpBackup.php or Special:Export or anything of that sort. You can, of course, get info and current revisions of pages with a generator: api.php?action=query&generator=allpages&prop=info|revisions&rvprop=content . This only does the main namespace (for other namespaces, use apnamespace) and only a limited number of pages at once (with aplimit=max and the apihighlimits right you'll get 5000), and the output won't be in Special:Export format (although, if all the required data is there, it shouldn't be too hard to write a converter).
> And what query string can take the same input as Special:Import to > import pages? > Nothing, sorry. > Don't worry. The wiki involved only has a handful of pages. > > Anyway, how could the mighty API lack the features of Special:Export, > whose user interface requires cutting and pasting. That the API lacks export and import functionality is mainly because nobody asked for it (you're the first one, IIRC). I once intended to add them, but dropped the idea for lack of time. I'll probably have time to implement these modules some time soon, though. Roan Kattouw (Catrope) _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
