Name | digikuery JSON |
Version |
20230529.post2
JSON |
| download |
home_page | |
Summary | Digikam database query tool |
upload_time | 2023-05-29 19:20:48 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.0 |
license | BSD-3-Clause |
keywords |
digikam
database
query
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
digikuery is a script to perform queries in [digikam](https://www.digikam.org/) (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
``` bash
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
``` bash
$ 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.
``` bash
$ 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"
``` bash
$ 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)
```
## Interactive shell in database
```
$ digikuery shell
Interactive mode help:
available objects
dk.session
dk.session.query(Album).count()
dk.session.query(AlbumRoot).all()
dk.session.query(Image).filter(Image.name == 'example.png').all()
dk.session.query(Album, Tag, sqlalchemy.func.count(Tag.name)).join(imagetag).join(Image).join(Album)
dk.engine
access sqlalchemy engine
dk.metadata
access sqlalchemy metadata
available functions
help()
print this message
dk.query_album(album)
dk.query_tag(tag)
dk.schema()
dk.stats()
running ipython...
In [1]:
```
## Internals
digikuery uses sqlalchemy to map digikam database to python objects.
Raw data
{
"_id": null,
"home_page": "",
"name": "digikuery",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.0",
"maintainer_email": "",
"keywords": "digikam,database,query",
"author": "",
"author_email": "Laurent Ghigonis <ooookiwi@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/90/3a/24527dff32f73c8f4a176bc6d11066324a90323e12743d1059d1933e6d6d/digikuery-20230529.post2.tar.gz",
"platform": null,
"description": "digikuery is a script to perform queries in [digikam](https://www.digikam.org/) (photo manager) database.\n\nIt can\n* Query albums which contains tags matching a given regex\n* Query most used tags and corresponding albums\n* Print other tags present in matching albums\n* List digikam database structure\n* Provide an interactive python shell for manual queries\n\n## Usage\n\n``` bash\nusage: digikuery.py [-h] [-d DBPATH] [-F] [-R ROOT] [-T [FILTER_TAGS]] {shell,schema,album,tag,stats} ...\n\ndigikuery - Digikam database query tool - v20230529\n\npositional arguments:\n {shell,schema,album,tag,stats}\n shell spawn ipython shell to explor digikam database\n schema dump digikam database schema\n album [album] list tags for one or all albums\n tag [tag] list all tags or query single tag\n -C sort by result count\n -I show image details\n stats show digikam database statistics (default)\n\noptions:\n -h, --help show this help message and exit\n -d DBPATH, --dbpath DBPATH\n database path\n -F, --full-tagname display full tag name\n -R ROOT, --root ROOT restrict query to this root album\n -T [FILTER_TAGS], --filter-tags [FILTER_TAGS]\n show and filter tags for displayed albums\n\nexamples:\nList albums when tag 'Paquerette' is present, together with other tags of this album\n$ digikuery tag Paquerette\n```\n\n## Install\n\n``` bash\n$ pip install digikuery\n```\n\n## Example: Query which albums contain given tag expression\n\nBellow we look for the \"semaphore\" name in all tags.\n\nThe query returns 2 tags \"TagCommunication/Semaphore/Bleu\" and \"TagAlphabet/Semaphore\", listing for each tag the albums containing tagged pictures.\n\n``` bash\n$ digikuery tag semaphore\n 3 TagCommunication/Semaphore/Bleu\n album_albanie\n album_france\n album_grece\n 1 TagAlphabet/Semaphore\n album_photos_19e_siecle\n```\n\nProviding -I option would list the picture names.\n\nLet's just sort them by picture count:\n\n```\n$ digikuery tag -C semaphore\n 3 TagCommunication/Semaphore/Bleu\n 3 album_france\n 2 album_grece\n 2 album_albanie\n 1 TagAlphabet/Semaphore\n 19 album_photos_19e_siecle\n```\n\nFor each matching album we can show if it contains other tags, for example tags maching \"access\"\n\n``` bash\n$ digikuery -T access tag semaphore\n 3 TagCommunication/Semaphore/Bleu\n album_france\n TagAccess/Walking (9), TagAccess/Train(1)\n album_grece\n\t\tTagAccess/Car(6), TagAccess/Walking (3)\n album_albanie\n\t\tTagAccess/Walking (5)\n```\n\n## Interactive shell in database\n\n```\n$ digikuery shell\nInteractive mode help:\n available objects\n dk.session\n dk.session.query(Album).count()\n dk.session.query(AlbumRoot).all()\n dk.session.query(Image).filter(Image.name == 'example.png').all()\n dk.session.query(Album, Tag, sqlalchemy.func.count(Tag.name)).join(imagetag).join(Image).join(Album)\n dk.engine\n access sqlalchemy engine\n dk.metadata\n access sqlalchemy metadata\n available functions\n help()\n print this message\n dk.query_album(album)\n dk.query_tag(tag)\n dk.schema()\n dk.stats()\nrunning ipython...\n\nIn [1]:\n```\n\n## Internals\n\ndigikuery uses sqlalchemy to map digikam database to python objects.\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Digikam database query tool",
"version": "20230529.post2",
"project_urls": {
"Homepage": "https://github.com/looran/digikuery"
},
"split_keywords": [
"digikam",
"database",
"query"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b3e187734793633aaaf6991aacc46f0e41b5487af2888e9aa9a8aa8466a09094",
"md5": "b2ee11aeaea8761d84733525179057d0",
"sha256": "5b5dc5b9d11b75e24e45285ef1fd38456e9a3705117843a162c367c1edcf3725"
},
"downloads": -1,
"filename": "digikuery-20230529.post2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b2ee11aeaea8761d84733525179057d0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.0",
"size": 6882,
"upload_time": "2023-05-29T19:20:46",
"upload_time_iso_8601": "2023-05-29T19:20:46.928365Z",
"url": "https://files.pythonhosted.org/packages/b3/e1/87734793633aaaf6991aacc46f0e41b5487af2888e9aa9a8aa8466a09094/digikuery-20230529.post2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "903a24527dff32f73c8f4a176bc6d11066324a90323e12743d1059d1933e6d6d",
"md5": "0ed037a0cac2cbb71de8bb35ea6a2ba7",
"sha256": "475c1fe80a58a50bf7516cb0fa86056619fd69ee8cf2375a8a32ab878a505e4f"
},
"downloads": -1,
"filename": "digikuery-20230529.post2.tar.gz",
"has_sig": false,
"md5_digest": "0ed037a0cac2cbb71de8bb35ea6a2ba7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.0",
"size": 6124,
"upload_time": "2023-05-29T19:20:48",
"upload_time_iso_8601": "2023-05-29T19:20:48.252597Z",
"url": "https://files.pythonhosted.org/packages/90/3a/24527dff32f73c8f4a176bc6d11066324a90323e12743d1059d1933e6d6d/digikuery-20230529.post2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-29 19:20:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "looran",
"github_project": "digikuery",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "digikuery"
}