Pywikibot/table2wiki.py

From Wikibooks, open books for an open world
Jump to: navigation, search
Bug blank.svg
Git repository of Wikimedia has this file:

Table2wiki.py is part of the pywikibot framework.

Converts HTML-tables to MediaWiki's language.

Example of the simplest syntax:

table2wiki.py "article name" This way only 1 article is changed.

The process can also take place automatically, to do this a xml dump is needed:

table2wiki.py -xml:20050406_cur_table.xml -lang:en 

-xml = name of the xml dump.

Note: Every change needs to be checked. This bot can make mistakes.

Global arguments available for all bots

arg Description Default
-family:xyz Set the family of the wiki you want to work on, e.g. wikipedia, wiktionary, commons, wikitravel, …. This will override the configuration in user-config.py settings. user-config.py parameter: family
-lang:xx Set the language of the wiki you want to work on, overriding the configuration in user-config.py where xx should be the language code[1]. user-config.py parameter: mylang
-log Enable the logfile. Logs will be stored in the logs subdirectory. user-config.py parameter: log ?
-log:xyz Enable the logfile, using xyz as the filename.
-nolog Disable the logfile (if it's enabled by default).
-putthrottle:nn
-pt:nn
Set the minimum time (in seconds) the bot will wait between saving pages. user-config.py parameter: putthrottle ?
-verbose
-v
Make the program output more detailed messages than usual to the standard output about its current work, or progress, while it is proceeding. This may be helpful when debugging or dealing with unusual situations. not selected
  1. Commons uses 'commons' for lang and family; Meta uses 'meta' for both.