Manual:Pywikibot/Compat/picasacopier.py
<translate> This page is kept for historical interest.</translate> | <translate> This page is documentation for Pywikipedia Compat, which is no longer supported.</translate> <translate> This page is kept for historical interest.</translate> <translate> It may document scripts and features that are obsolete and/or no longer supported.</translate> <translate> Do not rely on the information here being up-to-date.</translate> |
Picasa copier is a free Python program for easy upload of large numbers of public images from Picasa (Google web albums) to Wikimedia Commons. The program is part of Pywikipedia and is currently in verification state[1].
Installation
- Pywikipedia
Picasacopier is part of Pywikipedia. You first need to install pywikipedia. At Using the python wikipediabot you can find a manual on how to install pywikipedia. SVN install is recommended.
- Easy install
We need to install 2 more packages. For this we need setuptools. You can download the latest version at http://pypi.python.org/pypi/setuptools
- Python Image Library
Python Image Library (PIL) is used to show the image. You can install it by running the command at a command prompt:
easy_install PIL
- Google Data API kit
The Google data api kit is used to communicate with the Picasa web album api. (see Installing Google Data API Python Library)
Usage
To run Picasacopier you have to browse to the Pywikipedia folder. Then type the following:
python picasacopier.py
You are presented with various options:
- Options to tell what images to work on:
- -user_id - The id of the picasa web album user to work. Works on all public images uploaded by a user. (e.g. if your email is 'test@gmail.com', your User ID is 'test')
- -album_id - The id of the Picasa web album. (look here finding web album id number)
- Options to tell how to work on each image:
- -picasareview - Mark as picasareviewed
- -reviewer - Set the reviewer for picasareview
- -override - Remove the licensing part and replace it with something custom. Can be used for transfering copyrighted photo's for which you have OTRS permission. Use with care!
- -removecategories - Remove the suggested categories
- -addcategory - Manually add a category (will be supporting multiple categories)
- -autonomous - For autonomous uploading without showing of each image. Use with care!
Syntax:
python picasacopier.py -user_id:test -removecategories -addcategory:<category name>
Troubleshooting
Traceback (most recent call last): File "picasacopier.py", line 371, in <module> from PIL import Image, ImageTk # see: http://www.pythonware.com/products/pil/ ImportError: No module named PIL
You can fix this by manually PIL installation (Archived 2012-04-02 at WebCite) (not by easy_install).