[Digikam-devel] [Bug 109820] Offer: Utility script to export tag information of images into the filesystem
ahlgren at mit.edu
Fri Jul 28 01:06:55 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
------- Additional Comments From ahlgren mit edu 2006-07-28 02:06 -------
Quoting Rainer Krienke:
> Did you try the solution I found? Basically I think this one should work with relativ links provided that the File::Spec Perl module correctly constructs a relative path from an absolute one. In my limited testst it did.
Ah, Perl has a relative-path-constructing module? I haven't had a chance to see the new script in SVN, and may not have time until next week.
> Your suggestion for the export option is not yet quite clear to me. What would you expect the script to do in this case. Just copy photos instead of linking them?
I'm sorry, I'll try to be more clear. My suggestion is that currently your script has three problems, and I have an easy solution that will fix all of them:
If I were to use your current script to make the linktree, and tar the linktree and email the tree to a friend, my friend would not be able to use it on his computer.
Photo directory: /home/mats/Pictures
Relative linktree directory: /home/mats/Linktree
[ I archive the linktree with my photos into a tgz file and email it to a friend, who extracts it onto her desktop. ]
Friend's photo directory: /home/adria/Pictures
Friend's linktree directory: /home/adria/Desktop/Linktree
[ All the links will be broken on Adria's computer unless she moves it into her home directory. ]
This can become alot worse if I had my Photo directory as /home/mats/Creative/Pictures; then Adria would have had to create a folder structure somewhere called /Creative/Pictures and put her Linktree folder in just the right place... etc.
Every time you move the linktree directory, your links will break.
Every time you move around your albums in digiKam, or move pictures between albums, your links will break.
Create a folder (user gets to name it). That folder contains two directories: one named Linktree and one named Photos. The Photos directory is an exact clone of your actual Photo root directory, but all the image files are hard links ("ln" not "ln -s") to your regular files. Then, when creating the linktree, make the links using the Photos directory I just described as the $PhotoRootDir in your script. This fixes all three problems I think. (My friend will be able to untar the directory on her computer, and she'll have exactly one copy of each file and a working linktree without having to create strange new directories. Additionally, your links will rarely break on your own computer if you move your linktree directory, or if you move your photos around in digiKam.)
This has the added bonus that you can "rm" any entries in the Photos directory before tarring and emailing it to friends, rather than having to send ALL your photos. You can even include a script to remove the symlinks in the tagtree that have become dead after rm-ing.
P.S.: (One may think an easy solution is to turn all the links in the linktree to hard links. However, this can drastically increase the amount data you'd have to send if you want to tar and email your tagtree to a friend (consider the case where most of your pictures are all tagged with dozens of the same tags).
More information about the Digikam-devel