View previous topic :: View next topic |
Author |
Message |
masterinferno Apprentice


Joined: 28 Jul 2004 Posts: 236 Location: France
|
Posted: Mon Aug 14, 2006 5:10 pm Post subject: [Script] Classer des photos selon les données EXIF (résolu |
|
|
Salut tout le monde !
Quelqu'un connaîtrait un petit script (peu importe le langage) ou programme qui permettrait, dans un répertoire (et sous-répertoires compris)
- Scanner toutes les photos
- Déterminer la date de prise de vue selon les données EXIF
- Créer un répertoire selon ces données
- Y classer ainsi les photos convenablement
Merci d'avance
Si vous voulez plus de précisions, n'hésitez pas
edit: j'ai trouvé ça
http://linux-azur.org/wiki/wakka.php?wiki=PetitScriptPourPhotos
Mais, je ne crois pas qu'il puisse créer des répertoires  _________________ "La vérité, c'est comme la peau du saucisson: desfois, c'est dur à avaler."
Last edited by masterinferno on Mon Aug 14, 2006 7:21 pm; edited 1 time in total |
|
Back to top |
|
 |
masterinferno Apprentice


Joined: 28 Jul 2004 Posts: 236 Location: France
|
Posted: Mon Aug 14, 2006 5:28 pm Post subject: |
|
|
En fait, si ce script pouvait renommer le dossier en AAAA-MM-jj ça serait encore mieux
edit: https://forums.gentoo.org/viewtopic-t-442433-highlight-exif.html
Pas taper... j'ai pas cherché avant _________________ "La vérité, c'est comme la peau du saucisson: desfois, c'est dur à avaler." |
|
Back to top |
|
 |
masterinferno Apprentice


Joined: 28 Jul 2004 Posts: 236 Location: France
|
Posted: Mon Aug 14, 2006 7:03 pm Post subject: |
|
|
Bon...alors j'ai fait une petite tentative
Voici le script:
Code: | #!/bin/bash
find ./ -type f -iname '*.jpg' | while read file ; do
date=`jhead "$file" | grep ^Date | cut -d ":" -f 2- | cut -d " " -f 2`
if [ "$date" != "" ] ; then # check if really date found
YY=`echo $date | cut -d ":" -f 1`
MM=`echo $date | cut -d ":" -f 2`
DD=`echo $date | cut -d ":" -f 3`
test -d /home/totocaca/rangement/${YY}-${MM}-${DD} || mkdir /home/totocaca/rangement/${YY}-${$
mv "${file}" /home/totocaca/rangement/${YY}-${MM}-${DD}
fi
done |
et ça marche ! _________________ "La vérité, c'est comme la peau du saucisson: desfois, c'est dur à avaler." |
|
Back to top |
|
 |
|