how to get tags from one album to another?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to get tags from one album to another?

Daniel Bauer-2
Hello,

I work(ed) with digikam 0.9.2 and with svn-version. Each version has its own
album path and db.

Now I'd like to move all photos from 0.9.2 to the svn folder, but
*without loosing all my tags*.

How can I do that?

First idea was, to write all tags into IPTC and then move the folders and let
create the tags from IPTC in the "new" album. But as there are a lot of
tagged images in formats that don't support IPTC (CR2, tiff), this approach
doesn't work...

Is there a tool/script/something that could help me move the pictures together
with their tags?

thanks for hints

Daniel
--
Daniel Bauer photographer Basel Switzerland
professional photography: http://www.daniel-bauer.com
erotic art photos: http://www.bauer-nudes.com/en/linux.html
Madagascar special: http://www.fotograf-basel.ch/madagascar/
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: how to get tags from one album to another?

Arnd Baecker
Hi Daniel,

On Fri, 20 Jul 2007, Daniel Bauer wrote:

> Hello,
>
> I work(ed) with digikam 0.9.2 and with svn-version. Each version has its own
> album path and db.
>
> Now I'd like to move all photos from 0.9.2 to the svn folder, but
> *without loosing all my tags*.
>
> How can I do that?
>
> First idea was, to write all tags into IPTC and then move the folders and let
> create the tags from IPTC in the "new" album. But as there are a lot of
> tagged images in formats that don't support IPTC (CR2, tiff), this approach
> doesn't work...
>
> Is there a tool/script/something that could help me move the pictures together
> with their tags?

Not that I know of.
But it should be possible in the following way:
a) copy all images from 0.9.2 folder to the svn-folder
   (digikam is assumed to be not running). Use `cp -rp`
   to preserve rights etc.
b) start svn digikam so that all images get integrated into the database.
   leave digikam
c) Now the hard part is to write a script which
   for each of the new images
   - finds the database entries which are associated with it
     in the 0.9.2 database
   - adds those entries to the svn database
d) start svn digikam and all should be fine ;-)

Maybe cdigi
http://www.kde-apps.org/content/show.php?content=15103
could be used to extract the data?

I know, this is not a simple out of the box solution as
it requires to write the script. Morever, I have
to admit, that so far I have only used the database
to read properties, but never used it to add new stuff ...

Best, Arnd
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: how to get tags from one album to another?

Daniel Bauer-2
On Freitag, 20. Juli 2007, Arnd Baecker wrote:

> Hi Daniel,
>
> On Fri, 20 Jul 2007, Daniel Bauer wrote:
> > I work(ed) with digikam 0.9.2 and with svn-version. Each version has its
> > own album path and db.
> >
> > Now I'd like to move all photos from 0.9.2 to the svn folder, but
> > *without loosing all my tags*.
> >
> > How can I do that?
> > ...
> > Is there a tool/script/something that could help me move the pictures
> > together with their tags?
>
> Not that I know of.
> But it should be possible in the following way:
> a) copy all images from 0.9.2 folder to the svn-folder
>    (digikam is assumed to be not running). Use `cp -rp`
>    to preserve rights etc.
> b) start svn digikam so that all images get integrated into the database.
>    leave digikam
> c) Now the hard part is to write a script which
>    for each of the new images
>    - finds the database entries which are associated with it
>      in the 0.9.2 database
>    - adds those entries to the svn database
> d) start svn digikam and all should be fine ;-)
>
> Maybe cdigi
> http://www.kde-apps.org/content/show.php?content=15103
> could be used to extract the data?
>
> I know, this is not a simple out of the box solution as
> it requires to write the script. Morever, I have
> to admit, that so far I have only used the database
> to read properties, but never used it to add new stuff ...
>
> Best, Arnd

Hi Arnd,

Thanks for your answer. It's no problem to extract the data (I use this quite
often: I need to use my own mySQL database for the management of my photos -
because it seems nobody is interested in talking about a professional tagging
plugin... ;-(  ).

But the problem is to *insert* data. I tried, but with no success.

I extracted all data from Tags and TagsTree from "old version", changed all
the numbers (added highest value of id in "new" to each id/pid in "old", so
that there are not two identical ids), then added the overworked data from
old tables to the new tables.

It all looks fine, but digikam doesn't show the inserted tags. It just ignores
them and I don't know why???

When I add a new tag in digikam it gets the next id-number correctly. This new
tag appears, I can use it, even after closing and reopening digiKam. But
those tags "in between" that I have inserted directly into the tables just
don't appear.

Any hints?

regards

Daniel

--
Daniel Bauer photographer Basel Switzerland
professional photography: http://www.daniel-bauer.com
erotic art photos: http://www.bauer-nudes.com/en/linux.html
Madagascar special: http://www.fotograf-basel.ch/madagascar/
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: how to get tags from one album to another?

Marcel Wiesweg
> Thanks for your answer. It's no problem to extract the data (I use this
> quite often: I need to use my own mySQL database for the management of my
> photos - because it seems nobody is interested in talking about a
> professional tagging plugin... ;-(  ).
>
> But the problem is to *insert* data. I tried, but with no success.
>
> I extracted all data from Tags and TagsTree from "old version", changed all
> the numbers (added highest value of id in "new" to each id/pid in "old", so
> that there are not two identical ids), then added the overworked data from
> old tables to the new tables.

- I assume you have verified that the tags you inserted can be found in the
db? SELECT * FROM Tags WHERE id=...
TagsTree is not critical, there are triggers in the database that usually
insert new tags into that structure

- Your tags have a valid parent? I mean, a tag must have root as grandparent
somewhere up in the hierarchy. But you would have warning messages in the
console then.

>
> It all looks fine, but digikam doesn't show the inserted tags. It just
> ignores them and I don't know why???
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: how to get tags from one album to another?

Daniel Bauer-2
On Samstag, 21. Juli 2007, Marcel Wiesweg wrote:

> > Thanks for your answer. It's no problem to extract the data (I use this
> > quite often: I need to use my own mySQL database for the management of my
> > photos - because it seems nobody is interested in talking about a
> > professional tagging plugin... ;-(  ).
> >
> > But the problem is to *insert* data. I tried, but with no success.
> >
> > I extracted all data from Tags and TagsTree from "old version", changed
> > all the numbers (added highest value of id in "new" to each id/pid in
> > "old", so that there are not two identical ids), then added the
> > overworked data from old tables to the new tables.
>
> - I assume you have verified that the tags you inserted can be found in the
> db? SELECT * FROM Tags WHERE id=...
> TagsTree is not critical, there are triggers in the database that usually
> insert new tags into that structure
>
> - Your tags have a valid parent? I mean, a tag must have root as
> grandparent somewhere up in the hierarchy. But you would have warning
> messages in the console then.
>
> > It all looks fine, but digikam doesn't show the inserted tags. It just
> > ignores them and I don't know why???

Thanks Marcel,

the grandparents were the problem :-)

In the new database highest tag was 330, so I added this value+1 to all id's
and pid's in the old database before I imported them to the new db. So what
was 0 in old was then 331 in new. After I changed all 331 to 0 the tags are
here now perfectly as they should...

So next step will be importing the images db-data and assign them to the right
tags. I hope there are no uncles or parents-in-law to consider :-)

have a nice sunday

Daniel
--
Daniel Bauer photographer Basel Switzerland
professional photography: http://www.daniel-bauer.com
erotic art photos: http://www.bauer-nudes.com/en/linux.html
Madagascar special: http://www.fotograf-basel.ch/madagascar/
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users