digikam-select: Batch export from Digikam using the command line

Jens Benecke jens-digikam at spamfreemail.de
Wed Mar 22 14:31:16 GMT 2017


regarding your issue, I think I need Gilles’ help.
I select the full path like

SELECT DISTINCT r.specificPath AS root, a.relativePath AS path, i.name AS name
    FROM Images i
    LEFT JOIN ImageTags it ON it.imageid = i.id
    LEFT JOIN ImageInformation ii ON ii.imageid = i.id
    LEFT JOIN Tags t ON it.tagid = t.id
    LEFT JOIN Albums a ON i.album = a.id
    LEFT JOIN AlbumRoots r ON albumRoot = r.id
    WHERE root != '' AND path != ‚'
    AND — more specific filter options like tags, rating, etc.

and then just stick „root“, „path“ and „name“ together.
This works fine for me.
But it seems in your library „root“ is empty, while it should contain „/home“ to work.
See https://github.com/jensb/digikam-select/issues/1 ...

So, @GIlles:
What is the correct and reliable SELECT syntax to reconstruct a full image path using Digikam’s SQL db?

Thanks for all help :)

Jens Benecke - jens at spamfreemail.de
Keine Lust auf Müll in ihrem Postfach? www.spamfreemail.de

> Am 21.03.2017 um 11:00 schrieb Dmitri Popov <lazylegs at gmail.com>:
> Neat script, but it doesn't seem to work for me. I filed an issue at GitHub.
> Thanks,
> Dmitri
> On Tue, Mar 21, 2017 at 9:52 AM, daniel bip
> <daniel.mail.public at gmail.com> wrote:
>> Hi Jens,
>> Your script seems so interesting, some days ago I was thinking of something
>> similar, as I have a similar IT infrastructure for sharing DK's pictures at
>> home, so such a script would be amazing. I'll try to test it during this
>> week. Thank you very much for sharing!
>> BR,
>> d.
>> On 20 March 2017 at 22:51, Jens Benecke <jens-digikam at spamfreemail.de>
>> wrote:
>>> Hi everybody,
>>> I have finally finished scratching my very personal itch with Digikam and
>>> that was to be able to automatically (!) (re)export a fixed set of images
>>> from the Digikam database, without constantly having to perform the task
>>> manually in Digikam.
>>> May I humbly present "digikam-select.rb", first release:
>>>    https://github.com/jensb/digikam-select
>>> The idea is to be able to write scripts that automatically select images
>>> (and other files) from the digikam database based on rating, tags or album
>>> name and put copies somewhere else (e.g. on a NAS). The images can
>>> optionally be resized or recompressed using ImageMagick's "convert" utility.
>>> It is also possible to create symlinks or hardlinks saving space, only
>>> referencing matching images.
>>> I use this for the rest of my family: once a day digikam-select.rb selects
>>> all images tagged "for-Family", recompresses them using ImageMagick and
>>> recreates my album structure on our home NAS using these recompressed
>>> images. These folders are available to all family members and also
>>> automatically synced to our family Android tablet.
>>> So any time we want to go visit friends and maybe show some pictures we
>>> just grab the tablet and are sure only "suitable" images (but all good ones)
>>> are on there!
>>> There are many possible use cases, this is just one of them. Have a look,
>>> try it out, report bugs (on Github)!
>>> Thanks & enjoy,
>>> Jens

More information about the Digikam-users mailing list