Pywikibot/imagetransfer.py

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

Imagetransfer.py is a script of the pywikibot framework. It is used to copy images from one wiki to another wiki. If you want to transfer image to Wikimedia Commons you should use imagecopy.py.

Syntax:

    python imagetransfer.py [common-arguments] pagename [-interwiki] [-tolang:xx] [-tofamily:yy]

Arguments:


  -interwiki   Look for images in pages found through interwiki links.

  -tolang:xx   Copy the image to the wiki in language xx

  -tofamily:yy Copy the image to a wiki in the family yy

  -file:zz     Upload many files from textfile: [[Image:xx]]
                                                [[Image:yy]]

If pagename is an image description page, offers to copy the image to the target site. If it is a normal page, it will offer to copy any of the images used on that page, or if the -interwiki argument is used, any of the images used on a page reachable via interwiki links.

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.