[digiKam-users] List of files with a specific tag

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

[digiKam-users] List of files with a specific tag

mmjoshi
Is it possible to output the  list of all the images with a specific tag to a
text file? The way I am doing it currently is to copy all the images to a
directory and use a directory listing program to output the list to a text
file.



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: List of files with a specific tag

Maik Qualmann
It is currently not possible to copy the images displayed in the view with the
path to a text file. But why do you want to use an extra program for copying?
In current digiKam versions there is an export tool for copying into the local
file system.

Maik

Am Samstag, 10. April 2021, 06:59:58 CEST schrieb mmjoshi:
> Is it possible to output the  list of all the images with a specific tag to
> a text file? The way I am doing it currently is to copy all the images to a
> directory and use a directory listing program to output the list to a text
> file.
>
>
>
> --
> Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html




Reply | Threaded
Open this post in threaded view
|

Re: List of files with a specific tag

mmjoshi

It is currently not possible to copy the images displayed in the view with
the
path to a text file. But why do you want to use an extra program for
copying?
In current digiKam versions there is an export tool for copying into the
local
file system.

Maik

Hi Maik

Thanks for your response. I /*am*/ using digiKam to copy the images to a
local folder. I am using a third party program just to /*list* /the
directory of this folder to a text file. Would love to do this from within
digiKam. No sense in copying a huge number of images to a local folder. This
folder gets deleted anyway after I get the list of the images in a text
file.



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: List of files with a specific tag

Randy Wolf
In reply to this post by Maik Qualmann
Not sure if helpful to you, but you can easily do this on the backend db if you know sql.

Care should be taken, you can trash the db.

If you are using the SQLite db with Digikam you can download the sqlite3 cli and run sql commands and export to txt file. Or use a GUI tool.

The three tables at play are: Tags, Images, and ImageTags

You can use a select to lookup the id in Tags:
select * from tags;

Then another select to get a list of files with that tagid:
select images.name from images, imagetags where imagetags.tagid=100 and images.id=imagetags.imageid;


Reply | Threaded
Open this post in threaded view
|

Re: List of files with a specific tag

mmjoshi
Thanks Randy. Looks daunting though!

I have SQLiteDatabaseBrowserPortable, will try with that. The SQLite db is
digikam4.db right?

If I have to search for "Edited" tags the query to run is select Edited from
tags right? Not too familiar with the query syntax.

Will get back with more queries.



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: List of files with a specific tag

mmjoshi
In reply to this post by Randy Wolf
Randy Wolf wrote
> The three tables at play are: Tags, Images, and ImageTags
>
> You can use a select to lookup the id in Tags:
> select * from tags;
>
> Then another select to get a list of files with that tagid:
> select images.name from images, imagetags where imagetags.tagid=100 and
> images.id=imagetags.imageid;

Hi Randy

This worked perfectly. Thanks for the tip. However, I realized that I need
to exclude certain tags from the query. I tried hard to figure out how to do
this but with my limited (very!) knowledge of SQL couldn't figure out.

The scenario is like this. i would like to output a list of all files with a
specific tag say Tag1 but also exclude all files with another tag say Tag2.
Is this possible? If yes what query should I use?



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html
Reply | Threaded
Open this post in threaded view
|

Re: List of files with a specific tag

mmjoshi
Figured it out myself! Used two Select queries, one for each of the tags and
joined them using Except to remove the duplicates.



--
Sent from: http://digikam.1695700.n4.nabble.com/digikam-users-f1735189.html