[KPhotoAlbum] read-only web interface
jkt at gentoo.org
Mon Apr 2 01:12:16 CEST 2007
a simple demonstration of what I have now is available from . You
need both convert.py and query.py and besides them, command line
utilities for both sqlite-2 and sqlite-3 and Python package
python-sqlite (or PySQLite or however your distribution calls it).
At first, you have to copy the KPA database into format supported by my
tool (please notice the trailing period which means "place the resulting
file in current directory"):
$ ./convert.py ~/fotky/ .
Filenames in EXIF db look like '/home/jkt/fotky/2005-08-26 Voda Vltava
(Kazimír)/P1010362.JPG', using prefix '/home/jkt/fotky/'
Statistics: converted 8396 images (0 skipped), 0 mallformed dates, 3015
missing attrs, 123 missing EXIF
The tool will read the XML and SQLite database in the directory where
your images are stored (don't worry, it doesn't open them for writing)
and create one file, "sqlite.out", which it will later use for querying.
In the first line, it tries to tell you what it thinks the absolute path
to images is, which is needed because KPA stores full path to the image
in its EXIF db, so make sure it's correct if you want to query the EXIF
Check the statistics that it spits out for sanity; if it repoerts weird
numbers, either you've found a bug (in that case, I'd love to fix it) in
the script or you just made a mistake.
If you want to "convert" only images tagged with some value, proceed
like this (if you use fancy characters that your shell doesn't like,
enclose the values in ""):
$ ./convert.py --require Keywords web ~/fotky/ .
Now that we have the DB ready, let's do some querying:
Please enter condition (enter to quit, "help" for help): People:jkt &
2007-03-14 Ples Tereza Prášková/jkt/P1000894.JPG
Because we use readline, you can play with the Tab key and see your tag
names/values being suggested (modulo the non-ascii ones and those having
space or any other funny character inside, blame readline-python-unicode
And don't forget to try the "help" command :).
I'm looking forward to your replies mentioning how long did the
conversion take, how many pictures you have, how big the resulting
sqlite DB is and how do you find the querying in general.
cd /local/pub && more beer > /dev/mouth
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 252 bytes
Desc: OpenPGP digital signature
Url : /mailman/pipermail/kphotoalbum/attachments/20070402/d5f260c2/attachment.pgp
More information about the KPhotoAlbum