Jump to content

Manual:Pywikibot/imagecopy.py: Difference between revisions

From mediawiki.org
Content deleted Content added
m fix header
minor fixes
Line 14: Line 14:
Global arguments are available as well.
Global arguments are available as well.


== Example ==
== Examples ==
<syntaxhighlight lang=shell-session>
python pwb.py imagecopy -lang:en -family:wikibooks -cat:"GFDL images"
$ python pwb.py imagecopy -lang:en -family:wikibooks -cat:"GFDL images"
</syntaxhighlight>


<syntaxhighlight lang=shell-session>
Former version:
python imagecopy.py -lang:fr -family:wiktionary -page:Image:Fr-wiktionary-7val-com.gif
$ python pwb.py imagecopy -lang:fr -family:wiktionary -page:Image:Fr-wiktionary-7val-com.gif
</syntaxhighlight>


[[Category:Pywikibot scripts{{#translation:}}|imagecopy]]
[[Category:Pywikibot scripts{{#translation:}}|imagecopy]]

Revision as of 15:00, 20 April 2020

This is a script which copies images from a wikimedia wiki to Commons.

The script requires the python-tk (aka Tkinter) package, which depends on many X-server packages.

Parameters

  • -page:Image:<imagename> — work with a single image on a single page
  • -newimages:n — work with the n number of new images
  • -cat:<categoryname> — work in the specific category
  • -transcludes:<template> — work with all images transcluding a template
  • -always — skip the GUI validation

Global arguments are available as well.

Examples

$ python pwb.py imagecopy -lang:en -family:wikibooks -cat:"GFDL images"
$ python pwb.py imagecopy -lang:fr -family:wiktionary -page:Image:Fr-wiktionary-7val-com.gif