Skip to main content

Digikam database query tool

Project description

digikuery is a script to perform queries in digikam (photo manager) database.

It can

  • Query albums which contains tags matching a given regex
  • Query most used tags and corresponding albums
  • Print other tags present in matching albums
  • List digikam database structure
  • Provide an interactive python shell for manual queries

Usage

usage: digikuery.py [-h] [-d DBPATH] [-F] [-R ROOT] [-T [FILTER_TAGS]] {shell,schema,album,tag,stats} ...

digikuery - Digikam database query tool - v20230529

positional arguments:
  {shell,schema,album,tag,stats}
    shell                       spawn ipython shell to explor digikam database
    schema                      dump digikam database schema
    album               [album] list tags for one or all albums
    tag                 [tag]   list all tags or query single tag
                        -C      sort by result count
                        -I      show image details
    stats                       show digikam database statistics (default)

options:
  -h, --help            show this help message and exit
  -d DBPATH, --dbpath DBPATH
                        database path
  -F, --full-tagname    display full tag name
  -R ROOT, --root ROOT  restrict query to this root album
  -T [FILTER_TAGS], --filter-tags [FILTER_TAGS]
                        show and filter tags for displayed albums

examples:
List albums when tag 'Paquerette' is present, together with other tags of this album
$ digikuery tag Paquerette

Install

$ pip install digikuery

Example: Query which albums contain given tag expression

Bellow we look for the "semaphore" name in all tags.

The query returns 2 tags "TagCommunication/Semaphore/Bleu" and "TagAlphabet/Semaphore", listing for each tag the albums containing tagged pictures.

$ digikuery tag semaphore
  3 TagCommunication/Semaphore/Bleu
      album_albanie
      album_france
      album_grece
  1 TagAlphabet/Semaphore
      album_photos_19e_siecle

Providing -I option would list the picture names.

Let's just sort them by picture count:

$ digikuery tag -C semaphore
  3 TagCommunication/Semaphore/Bleu
      3 album_france
      2 album_grece
      2 album_albanie
  1 TagAlphabet/Semaphore
      19 album_photos_19e_siecle

For each matching album we can show if it contains other tags, for example tags maching "access"

$ digikuery -T access tag semaphore
  3 TagCommunication/Semaphore/Bleu
      album_france
        TagAccess/Walking (9), TagAccess/Train(1)
      album_grece
		TagAccess/Car(6), TagAccess/Walking (3)
      album_albanie
		TagAccess/Walking (5)

Internals

digikuery uses sqlalchemy to map digikam database to python objects.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

digikuery-20230529.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

digikuery-20230529-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file digikuery-20230529.tar.gz.

File metadata

  • Download URL: digikuery-20230529.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for digikuery-20230529.tar.gz
Algorithm Hash digest
SHA256 ef068b1b185e2f7522cb34ad2d1b98edd85fac0e4c1351067b441ae3e4cc128b
MD5 11eb525bd6e7d26946e87ea26d0445d3
BLAKE2b-256 3a5a97364391b6dd811fe5d9c6ac78618cb361649e63fc38c403f8185bbc44de

See more details on using hashes here.

File details

Details for the file digikuery-20230529-py3-none-any.whl.

File metadata

File hashes

Hashes for digikuery-20230529-py3-none-any.whl
Algorithm Hash digest
SHA256 7dbdd8ecbf3026fa346e741891bc4fc64401f4d9b72aede227f3c990a27a73b4
MD5 2c44a395954dcc019dafd2ceb334eafa
BLAKE2b-256 b6f35ba2c7906317ac699bc7a8d32cab4727fa8805de712e8fe7d8d29df5b138

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page