Manual:Pywikibot/listpages.py/yo

listpages.py is a script used to print a list of pages, as defined by page generator parameters.

Optionally, it also prints page content to STDOUT or save it to a file in the current directory.

Specific arguments
Custom format can be applied to the following items extrapolated from a page object:


 * site - obtained from page._link._site.
 * title - obtained from page._link._title.
 * loc_title - obtained from page._link.canonical_title.
 * can_title - obtained from page._link.ns_title. based either the canonical namespace name or on the namespace name in the language specified by the -trans parameter; a default value '******' will be used if no ns is found.
 * onsite - obtained from pywikibot.Site(outputlang, self.site.family).
 * trs_title - obtained from page._link.ns_title(onsite=onsite). If selected format requires trs_title, outputlang must be set.