Image2DocInfo
What's that
This tool provides a way to describe pictures. Image2DocInfo has been made to quickly and simply tag digital pictures. A GUI allows you to set different attributes for an image, and then stores them in XML files. Those XML files follow the Dublin Core naming scheme and are stored in the same directories than the pictures themselves.Distincts tools (your file manager) permits to save on CD pictures with their descriptions, and to generate albums from the XML files (see provided sample script).
The tool itself is written using the python programming language, uses wxPython for its user interface, and the Python Imaging Library for image processing when generating a gallery. The lossless rotation of pictures is made through jhead and jpegtran tools.
Warning
This is still alpha software : you should only use it on your precious pictures AFTER having saved them.Feedback
For feedback, you can contact me directly (Norbidur__gmail__com) or use sourceforge tools on http://sourceforge.net/projects/image2docinfo/. The home page for this project is http://image2docinfo.sourceforge.net/.If you use Image2DocInfo and like it, drop me a line.
If you use Image2DocInfo and hate it, drop me a line.
If you can't install Image2DocInfo, drop me a line.
If you need more features, drop me a line.
If you find a bug, drop me a line.
If you can provide a translation, drop me a line.
If my english is poor on this page, drop me a line.
Download
You can download Image2DocInfo from sourceforge. Current version is 0.1. It is the initial release.Screenshots
See Image2docinfo in action.Generate web album
With the generated XML files, you can for exemple generate a gallery with a provided script. This gallery is provided as a "teaser", it still has some problems with accented characters. This gallery shows you that you can use the directory name containing the original images (20030729 for example) as index, but also subject names that you stored with Image2docinfo (such as Vacances été 2003 or St-tropez).This gallery has been made from the following directory structure.
To actually generate the web album, use the provided Filling.py script.
The usage is the following :
python image2docinfo.py [-h] [-t thumbDir] [-p pixDir] [-w webDir] [-c colNumber] [-r rowNumber] [-a thumbWidth] [-b thumbHeight] [-x pixWidth] [-y pixHeight] [-t title] [-s subject1] srcDir dstDir -h help -t thumbDir name of thumbnail's directory default "thumb" -p pixDir name of pix's directory default "pix" -w webDir name of html's directory default "html" -c colNumber number of columns in generated html tables default 5 -r rowNumber number of rows in generated html tables default 3 -a thumbWidth max width of thumbnail default 120 -b thumbHeight max heigth of thumbnail default 120 -x pixWidth max width of thumbnail default 640 -y pixHeight max heigth of thumbnail default 480 -t title title of web pages -s subject a subject to index (any -s option) srcDir base dir of your pictures dstDir destination dir which must existThe dstDir should be an empty existing directory, while the srcDir actually contains your digital images and docinfo.xml files (see this file for example). Lot of logs will be written to stdout : Filling.py is still under development. When it has finished its job (can be loooong), you can copy the provided style.css file to srcdir/html.
User documentation
Launch it
To launch Image2DocInfo simply launch image2docinfo.py by double clicking on the file in your file manager.You are then provided a screen with on the right side :
- Next and previous buttons to navigate in the current directory.
- An Open.. button to choose a file. The directory containing this file will become the current directory.
- A Rotate button to turn the current picture clowkwise. This operation is the only one which will change your picture file.
- Author
- Date (get from the Exif informations, or if none available from the last modified date of the file)
- Title
- Keywords (will be stored as Dublin Core Subject)
- Description
- Type (currently always Image)
- format (currently alway image/jpeg)
- File name (will be stored as Dublin Core Identifier)
- Coverage
- MD5sum
- a publish field
Basic ideas of Image2DocInfo
You set the fields you want for the current picture. You can add keywords, which will be kept for the next session. When you choose another picture (either by using the Open.. button or the ok and next button), the fields you entered are kept. The idea behind that is that in the same folder you will probably have pictures of the same kind and so you will probably only have to change the title and description fields.Supported languages and platforms
Currently only english and french languages are supported. Image2DocInfo works on linux and windows OS.Generated files
In each directory that you use, a docinfo.xml file is created. It follows the following sample format :<?xml version="1.0" encoding="ISO-8859-1"?> <directory xmlns:dc="http://purl.org/dc/elements/1.1/"> <meta> <dc:Creator>Norbidur</dc:Creator> <dc:Title>La baie de Saint-tropez</dc:Title> <dc:Date>20030729</dc:Date> <dc:Description/> <dc:Identifier>20030729-LabaiedeSaint-tropez.jpg</dc:Identifier> <dc:Coverage>Saint-Tropez</dc:Coverage> <Publish>1</Publish> <Md5sum>567892f68c0051c7985d0634df91d153</Md5sum> <dc:Subject>2003 hollydays</dc:Subject> <dc:Subject>My daughter</dc:Subject> </meta> <meta> <dc:Creator>Norbidur</dc:Creator> <dc:Title>La baie de Saint-tropez</dc:Title> <dc:Date>20030729</dc:Date> <dc:Description></dc:Description> <dc:Identifier>20030729-LabaiedeSaint-tropez-1.jpg</dc:Identifier> <dc:Coverage>Sainte-Tropez</dc:Coverage> <Publish>1</Publish> <Md5sum>78267389c739fb406f7396ab44f1f0f6</Md5sum> <dc:Subject>2003 hollydays</dc:Subject> </meta> </directory>A config file containing the last meta data used, every creator and every subject used is saved :
<?xml version="1.0" encoding="ISO-8859-1"?> <conf xmlns:dc="http://purl.org/dc/elements/1.1/"> <Subject>2003 hollydays</Subject> <Subject>The beach</Subject> <Subject>My daughter</Subject> <Creator>Norbidur</Creator> <Creator>My daughter</Creator> <LastFile>Z:\images\Mes images\2003-08-06, Photo\Photo 284.jpg</LastFile> <meta> <dc:Creator>Norbidur</dc:Creator> <dc:Title>Saint-Tropez beach</dc:Title> <dc:Date>20030805</dc:Date> <dc:Description>Here we see boats.</dc:Description> <dc:Identifier>20030805-Saint-Tropezbeach.jpg</dc:Identifier> <dc:Coverage>Saint-Tropez</dc:Coverage> <Publish>0</Publish> <Md5sum>9a881e6391d8abb9cd895e72bde6955a</Md5sum> <dc:Subject>2003 hollydays</dc:Subject> <dc:Subject>The beach</dc:Subject> </meta> </conf>
TO DO List
- Some code cleanup is required
- Handling of image and video files which are not jpeg files
- Some code speed up : currently it can be slow on large directories
- Handling of Subject lists : currently there is only one list which can become pretty big
- Regenerate conf.xml file from a docinfo.xml files scan
- Provide a generic tool to operate on docinfo.xml files
- Make a better build system (setup.py)
- Beautify the GUI
License
GPLRequired tools
Linux
Linux users will have no problem running those programs. With the debian distribution,apt-get install wxpythongives you eveything required to use Image2docInfo. To be able to use the "rotate" function, you need
apt-get install jheadand
apt-get install libjpeg-progs
To use the Filling.py script, you need also to
apt-get install python-imaging
Windows
I will soon (before end of january) provide an auto-installable package. Meantime you should manually install :- python : http://www.python.org/download/. The 2.3.4 version is the one I use, but eveything should be OK with each version greater or equal than 2.2.
- wxPython : http://wxpython.org/download.php
- Python Imaging Library : http://www.pythonware.com/products/pil/index.htm.
- jhead and jpegtran : I use a native windows jhead that I put somewhere in the path. I usually use cygwin provided jpegtran, but this one should be OK too.
Tools I used to make Image2DocInfo
- emacs editor
- wxGlade to generate the GUI
- FireFox browser to find documentation.
- Thanks to Thierry Bousch for his python code to handle exif data
Norbidur__gmail__com Last modified: Fri Jan 21 00:17:37 +0100 2005