Manual:Pywikibot/listpages.py

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 <tvar|ns_title>page._link.ns_title</>. based either the canonical namespace name or on the namespace name in the language specified by the <tvar|trans>-trans</> param; a default value '<tvar|default>******</>' will be used if no ns is found.
 * <tvar|onsite>onsite</>: obtained from <tvar|site>pywikibot.Site(outputlang, self.site.family)</>.
 * <tvar|trs_title>trs_title</>: obtained from <tvar|ns_title>page._link.ns_title(onsite=onsite)</>. If selected format requires <tvar|trs_title>trs_title</>, outputlang must be set.