Catmandu::Importer::MWTemplates - extract MediaWiki template data
Command line client catmandu
:
catmandu convert MWTemplates --file example.wiki
catmandu convert MWTemplates --site en --page Feminis
catmandu convert MWTemplates --site de --page Feminism --template Literatur
This Catmandu::Importer extracts MediaWiki Templates from wiki pages.
-
site
The MediaWiki site to get data from. This must either be a base URL such as http://en.wikipedia.org/ or a Wikipedia name tag, such as
en
. If no site is specified, the input is read fromfile
or standard input as wiki markup. -
page
A wiki page to get data from.
-
template
A template to extract data for. If not specified, all templates will be extracted with the template name if field
TEMPLATE
. -
tempname
The field to store template name in. Set to
TEMPLATE
by default. -
wikilinks
Keep wikilinks if set to 1 (default). If disabled (0), links will be transformed to plain text. If set to 0, links will be transformed to their link target.
See Catmandu::Importer for general importer methods.
The core parsing method is based on a script originally created by Erich Zachte: http://meta.wikimedia.org/wiki/User:LA2/Extraktor
Copyright Jakob Voss, 2015-
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.