1digitaglinktree(1)            Linux User's Manual           digitaglinktree(1)
2
3
4

NAME

6       digitaglinktree  -  Export  tag  structure  of photos in digikam to the
7       filesystem.
8

SYNOPSIS

10       digitaglinktree -r rootdir
11
12       -l taglinkdir | -A archivedir
13
14       -d database
15
16       [-H|-f|-a|-v|-C]
17
18

DESCRIPTION

20       digitaglinktree will create a linktree for  all  photos  in  a  digikam
21       database that have tags set on them. Tags (like eg. "family", "events",
22       ...)  are used in digikam to create virtual folders  containing  images
23       that all have one or more tags assigned.  Please note: Photos that have
24       no tags at all assigned are silently ignored by this script.  The  pro‐
25       gram  will  not  modify  or  even touch your original photos managed by
26       digikam.
27
28
29       The script can be used in two ways: If you call  it  using  Option   -l
30       taglinkdir   the  script  will  create  the  user  specified  directory
31       taglinkdir and inside this directory it will create sub directories for
32       digikam  tags   set  on the photos. Inside these subdirectories it will
33       finally  place symbolic or hard links  (see -H) to  photos  having  the
34       tags  in question.  As a result you will see the tags of your photos as
35       folders and in these folders  you will find links to your original pho‐
36       tos.
37
38
39       In  this  way  you can access the collection of all images that share a
40       certain tag by changing directory to the folder with the tags name cre‐
41       ated  by this script.  This allows you e.g. to run JAlbum a photo album
42       software that needs to find the pictures to be put into a web album  in
43       the  filesystem  because  JAlbum cannot access digikams virtual folders
44       directly.
45
46
47       The second way of calling this script is the so called archive-mode  by
48       setting option  -A archiveDir.
49
50       Archive  mode  is thought for people who want to archive  tagged photos
51       independently of digikams root  directories  and  the  photos  therein.
52       This  way  you can put your photos and their tag structure in eg. a tar
53       archive and send it  to a friend, who can look at the photos  via their
54       tag  structure.  In this mode the script creates the directory given as
55       parameter to -A and in this  directory  two  more  subdirectories.  One
56       named   Photos  and a second named Tags.  The Photos directory contains
57       hard links  to your original photos, and the Tags directory contains  a
58       subdirectory for each  Tag used by any of your photos. Inside this sub‐
59       directory there are links (either symbolic or hard links) to the  files
60       in  the  Photos directory. This way the archive  directory needs nearly
61       no additional space on your harddisk  and  you  have  an  archive  that
62       allows you or a friend to easily look at the photos tag structure.
63
64       Another  benefit  from  using  this  script  is that you have kind of a
65       backup of your tag settings for all of your photos. The backup is  sim‐
66       ply  the  directory  structure  containing links to the original images
67       that wear the tags.  This could become important if for whatever reason
68       the digikam.db file gets corrupted or even lost.
69
70

COMMAND-LINE OPTIONS

72        -r rootdir
73              rootdir  denotes  the digikam base directory containing all your
74              photos.
75
76
77        -l taglinkdir
78              Parameter  taglinkdir denotes  a  directory  in  which  the  tag
79              structure  of all your photos stored in rootdir will be exported
80              to by creating subdirectories for each tag and placing  symbolic
81              links  in  these subdirectories that point to the original photo
82              wearing  the  tags.  If  calling  the  script  with  option   -l
83              taglinkDir you also have to  specify options -r  rootdir as well
84              as -d database.
85
86
87        -A archivedirectory
88              archivedirectory denotes a directory into which the script  will
89              export  the  photos   and their tag structure. -A has to be used
90              together with option  -r  rootdir as well as  -d  database  else
91              the  script  will  terminate.  Inside the archive  directory the
92              script will create a Photos and a Tags directory.  It  will  put
93              hard links in the  Photos directory  that point to your original
94              photos. By using hard links you are independent  of  changes  in
95              your  digikam  root directory but on the other hand you are lim‐
96              ited to one filesystem.  So the directory given  by  -r  rootdir
97              and  the  directory  specified for -A archivedir have to be  one
98              the same filesystem. The Tags subdirectory will contain links to
99              the files in the Photos directory. This way you have one archive
100              directory that is completely self contained.  You  can  tar  it,
101              send  it  to  a friend or  just put it somewhere for archivel or
102              backup purposes. Usually only those photos will be archived that
103              have  a  digikam tag set on them. By using option -C however you
104              can perform a complete archive. See -C for more infos.
105
106
107        -d database
108              database is the complete path including the filename to digikams
109              photo  database  which  usually  can  be  found in digikams root
110              directory. The files name  is usually digikam.db .
111
112
113        -C    When the script is called with option -A archivedir  only  those
114              photos  will be archived (by placing links) in the Photos subdi‐
115              rectory of archivedir that have at least one digikam tag set. By
116              setting option -C all photos will be  archived to  archivedir no
117              matter if they have a tag set or not. Note:  This  only  changes
118              the  contents of the Photos  subdirectory not of the Tags subdi‐
119              rectory in the archivedir directory.
120
121
122        -a    By default the script will try to create relative symbolic links
123              from  the  directory   taglinkdir  set by option -l to the photo
124              files under rootdir given by option -r. Using this  option  will
125              result  in   absolute  symbolic  links beeing created instead of
126              relative ones.
127
128
129        -H    By default the script will create soft (symbolic) links from the
130              Tag-Tree to the photos. By setting option -H the script will use
131              hard links instead. Please note that hard links can only be cre‐
132              ated inside one filesystem. So your photos and the Tag tree have
133              to be one the same filesystem. If not you  will  see  a  warning
134              about this problem and the script will not run.
135
136
137        -f    In digikam photos can have hierachical tags (tags that have sub‐
138              tags). In this case  digitaglinktree  would  by  default  add  a
139              directory for the tag and a subdirectory for each of the subtags
140              of this tag. By setting  -f  a subtag is treated like a  regular
141              tag  just  as  its parent tag so digitaglinktree will create all
142              subdirectories for tags and subtags at the same  level  indepen‐
143              dent of the tag - subtag hierarchy.
144
145
146        -v    Prints the scripts version number and exits.
147
148
149

CONFIGURATION

151       The  script  has  to  know  which version of database is beeing used by
152       digikam.  The script needs this information to find the correct  sqlite
153       binary to start queries to the database.
154
155       You  have  to  configure  the  script by setting the path to the sqlite
156       binary that is used  by  the  script  to  query  the  digikam  database
157       digikam.db.  Since  older  digikam version use sqlite in version 2, but
158       later digikam 0.80 versions needs sqlite version 3  you  have  to  take
159       care to install the correct version of sqlite for the installed digikam
160       version and to set the path to the correct  sqlite  executable  in  the
161       scripts head:
162
163       Choose
164
165       $SQLITE="/usr/bin/sqlite3";
166
167       for digikam version 0.8x and 0.9x and
168
169       $SQLITE="/usr/bin/sqlite";
170
171       for digikam version 0.7x.
172
173

EXAMPLE

175       A call to digitaglinktree is shown below:
176
177       digiTagLinktree    -r   /home/user/photos   -l   /home/user/photos/tags
178       -d /home/user/photos/digikam.db
179
180       In this example digikams photo root denoted by -r is  /home/user/photos
181       where  all  of the photos can be found that are managed by digikam. The
182       option -l /home/user/photos/tags tells the script that all  the  subdi‐
183       rectories   and   symbolic  links  will  be  placed  in  the  directory
184       /home/user/photos/tags. Because the link directory  is  below  digikams
185       root  directory  in  this  example, you will see a new album in digikam
186       after running the script that contains the exported tag structure  with
187       all  the photos inside.  Since only links are used here this tag struc‐
188       ture does hardly need any additional space on your harddisk.
189
190

AUTHORS

192       digitaglinktree  was  written  by  Rainer  Krienke  <krienke  at   uni-
193       koblenz.de>
194
195
196
197                                 16 Aug 2006                digitaglinktree(1)
Impressum