/mediawiki-uploader

Automatically exported from code.google.com/p/mediawiki-uploader

Primary LanguagePythonOtherNOASSERTION

Mediawiki Uploader 0.1

Author: T Shrinivasan
Email: tshrinivasan@gmail.com

Description:

Mediawiki uploader uploads all the files in the current directory to a mediawiki installation.

I created this to contribute to Wikimedia Commons.
http://commons.wikimedia.org

You need the following to use this application.

1. Mediawiki API path
2. Username
3. Password
4. Default Category for the photos

Provide them in the following variables

1. wiki_url
2. wiki_username
3. wiki_password
4. category


Example:
wiki_url = "http://commons.wikimedia.org/w/api.php"
wiki_username = "tshrinivasan"
wiki_password = "MY PASSWORD HERE"

We need to add XMP tags to the images to add the detailed filename and description.
I use GThumb image viewer in my ubuntu 11.10 machine.

Using this, we can add/edit comments using the following menu
Edit->Comment or Ctrl+M

Filled the values for "Description" and "Title"

These values will be used as description and filename while uploading.

Note: If you do not set the Description and Title using the GThumb viewer, that file wont get uploaded.



Note:
====

The latest GThumb, Mine is 3.2.8, saves the Comments details we give to the images in a folder ".comments" and save in xml format.
But, we need to save the comments inside the images, so that the comments will move along with the images, even if we move the images to different folders and computers.

To disable the property of saving comments in ".comments" folder, do as below.


In Gthumb, Goto Edit->Preference

In the preference window, select "Extensions" tab.

Disable "Comments and Tags" option

Then, click "OK"


Now, the comments are saved inside the images itself as XMP data.







How to run?
-------------

goto the folder that contain images in terminal or command line

run the followinf command:

python mediawiki-uploader.py


Notes:

After uploaded the files will be moved to a subdirectory named "uploaded-<timestamp>".
If any file is missed out in the current directory, this means that the IPTC tags are not set properly.
Use GThumb and set them.