Here we will assume that you want to install the module as a user, say in $HOME/local;
$ mkdir -p ~/local/bin $ perl -MCPAN -e shell
Answer a bunch of question the first time. At some point, you have to enter:
Then, in the CPAN shell, type
> install Image::Kimdaba
You need to modify two environment variables (change the version number accordingly):
export PERL5LIB=~/local/lib/perl5/site_perl/5.8.3:~/local/lib/perl5/5.8.3 export PATH="$HOME/local/bin:$PATH"
If everything is OK, it's now time to test if it works. Launch KPhotoAlbum's demo (in themenu) and run:
$ kim_example.pl /tmp/kphotoalbum-demo-$USER
Thanks to the CPAN infrastructure, you only need to type:
$ perl -MCPAN -e 'install Image::Kimdaba'
On Debian it's possible to automagically install Image::Kimdaba . Install first dh-make-perl, and then (as root) :
# dh-make-perl --build --install --cpan Image::Kimdaba
|The README file on CPAN may be more up to date.|
Here we describe scripts already made that you may find useful.
The first time, do:
$ ./kim_2_digikam <rootfolder>which will create the digikam.db database used by digiKam (>= 0.7 and < 0.8 )
Launch KPhotoAlbum, do some changes, relaunch the script
$ ./kim_2_digikam <rootfolder>which will update the digikam.db database (you have to restart digiKam to see the changes, though).
Add some categories in digiKam to some pictures and relaunch the script
$ ./kim_2_digikam <rootfolder>Then you can import the modifications you made with digiKam by doing in KPhotoAlbum:
The good thing with synchronizing with digikam.db is that you can then use the digikamtags:/ KIOSlave to browse by Persons or Keywords or Locations in every KDE app. (And add a tab "KPhotoAlbum" -> url=digikamtags:/ in Konqueror sidebar for example).
If you really like the many beautiful ways that JAlbum will let you display the images, but you are not willing to abandon KPhotoAlbum, use this script to duct tape your KPhotoAlbum's comments to JAlbum.
$ ./kim_jalbum.pl <rootfolder>
Then download JAlbum and install it (Java required). You need to do some setup first:
JAlbum only allows you to make a gallery from one folder (and its subfolders) while KPhotoAlbum does not have this restriction. Here is a solution:
Create a directory with symlinks to your tagged pictures :
$ kim_jalbum.pl ~/Images --exportdir ~/Syms/patou/
That's it, now use ~/Syms/patou/ as Image Directory
In KPhotoAlbum's browser, you can see the list of the persons on your pictures by name, or by icons. In the viewer, you can assign an icon for a person of the pictures by Right click ->, but it's a bit long if you have 500 persons. So this script will choose it for you.
$ mkdir -p <rootfolder>/CategoryImages $ ./kim_category_images <rootfolder>
It's faster than to set the 500 pictures by hand, isn't it? You can still use the category editor to choose a better picture for this person or that keyword, the script will not overwrite it.
In KPhotoAlbum, you can rotate pictures, but the pictures will not be really rotated, the rotation will only be stored in the index.xml database. To improve interoperability with other software, it's useful to really rotate. Quit KPhotoAlbum and use this script (you need the jpegtran tool)
$ ./kim_rotate.pl <ルートフォルダー>
(This is a bit proof-of-concept for Kimdaba.pm, but could be useful when using non kde apps (see kim_2_digikam ))
Edit the first line of the script, then
$ ./kim_2_filesystem <rootfolder>
If you need to export your comments in another format, or you want to do some fun thing not available with Kimdaba and you know a bit of Perl, you can Write your own extension , it's very easy.
If you feel the need, you can share your script with other people by editing this page and sending an email to the KPhotoAlbum mailing-list.