Note de ce sujet :
  • Moyenne : 3 (1 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
recherche d'image sans mots clefs / tags
#2
Cette possibilité n'existe pas dans darktable. J'ai écrit un script (images-non-taguées.sh) pour identifier ces images.
Code :
#!/bin/bash
# copyright jp verrue
# licence GPL V2

function folder()
{
pellicule=$1
[ -z ${pellicule} ] && exit 1

sqlite3 ~/.config/darktable/library.db << EOS
select distinct film_rolls.folder
from images, film_rolls
where  images.film_id = film_rolls.id
and film_rolls.folder like "%/Photos/${pellicule}%"
and images.id not in
(select tagged_images.imgid from tagged_images, used_tags
       where tagged_images.tagid = used_tags.id
       and used_tags.name not like "darktable%")
order by 1
;
EOS
}

function all()
{
sqlite3 ~/.config/darktable/library.db << EOS
select film_rolls.id as "filmroll_id", images.id as "image_id", film_rolls.folder, images.filename
from images, film_rolls
where  images.film_id = film_rolls.id
and images.id not in
(select tagged_images.imgid from tagged_images, used_tags
       where tagged_images.tagid = used_tags.id
       and used_tags.name not like "darktable%")
order by 3, 4
;
EOS
}

function files()
{
pellicule=$1
[ -z ${pellicule} ] && exit 1

sqlite3 ~/.config/darktable/library.db << EOS
select film_rolls.id as "filmroll_id", images.id as "image_id", film_rolls.folder, images.filename
from images, film_rolls
where  images.film_id = film_rolls.id
and film_rolls.folder like "%/Photos/${pellicule}%"
and images.id not in
(select tagged_images.imgid from tagged_images, used_tags
       where tagged_images.tagid = used_tags.id
       and used_tags.name not like "darktable%")
order by 3, 4
;
EOS
}

case $1 in
       "-f")   shift
               folder $1
               ;;
       "")     all
               ;;
       *)      files $1
               ;;
esac
Tu peux l'utiliser de trois façons différentes :
  • images-non-taguées.sh -f <pellicule à analyser>    # analyse une pellicule
  • images-non-taguées.sh                                         # analyse le cotenu complet de la BdD
  • images-non-taguées.sh <nom de fichier .... >         # analyse les fichiers donnés en argument.
Mes photos : jpverrue.fr
Répondre


Messages dans ce sujet
RE: recherche d'image sans mots clefs / tags - par jpverrue - 14-01-20, 15:58

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)