Module pywikipedia.copy_table
Script to copy a table from one Wikipedia to another one, translating it
on-the-fly.
Syntax:
copy_table.py -type:abcd -from:xy Article_Name
Command line options:
-from:xy Copy the table from the Wikipedia article in language xy
Article must have interwiki link to xy
-debug Show debug info, and don't send the results to the server
-type:abcd Translates the table, using translations given below.
When the -type argument is not used, the bot will simply
copy the table as-is.
-file:XYZ Reads article names from a file. XYZ is the name of the
file from which the list is taken. If XYZ is not given, the
user is asked for a filename.
Page titles should be saved one per line, without [[brackets]].
The -pos parameter won't work if -file is used.
-image Copy all images within the found table to the target Wikipedia.
Make sure the bot is logged in before trying to upload images.
Article_Name: Name of the article where a table should be inserted
Function Summary |
|
get_table(text)
|
|
imagelinks(site,
text)
|
|
print_debug(text)
|
|
treat(to_pl,
fromsite)
|
- Imported modules:
-
pywikipedia.lib_images
,
re
,
string
,
sys
,
pywikipedia.translator
,
pywikipedia.wikipedia
- Imported variables:
-
__version__
,
endR
,
msg
,
startR