2023-10-31 16:17:23 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# capture n°080530
|
|
|
|
#hugin_executor /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/output_pto/merging_080530.pto --stitching --prefix=assemblage_080530 -t=6
|
|
|
|
|
|
|
|
###################################
|
|
|
|
# complétion des données gps depuis une des photos assemblées
|
|
|
|
###################################
|
2023-12-09 12:02:54 +01:00
|
|
|
# exemple
|
|
|
|
# bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/exif_batch.sh 36077 38695 INBOX_a_assembler/rouen_3
|
2024-02-09 10:42:36 +01:00
|
|
|
# va assigner les données exif des photos gopro GF36077.JPG à leur assemblage assemblage_063077.jpg
|
2023-11-23 11:23:07 +01:00
|
|
|
|
2023-11-23 14:10:45 +01:00
|
|
|
#folder="rouen/rouen_oct23"
|
2023-10-31 16:17:23 +01:00
|
|
|
|
|
|
|
function batch_exif_photos {
|
2024-02-07 22:30:01 +01:00
|
|
|
echo "# assemblage des infos exif en batch"
|
|
|
|
|
2023-10-31 16:17:23 +01:00
|
|
|
local min=$1
|
|
|
|
local max=$2
|
2023-11-23 14:10:45 +01:00
|
|
|
local folder=$3
|
2023-11-23 11:23:07 +01:00
|
|
|
local dir="/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/$folder"
|
2023-10-31 16:17:23 +01:00
|
|
|
|
2023-12-09 12:02:54 +01:00
|
|
|
echo "subdirectory of gopro is $dir"
|
2023-10-31 16:17:23 +01:00
|
|
|
echo $(seq $min $max)
|
|
|
|
|
|
|
|
for i in $(seq $min $max); do
|
|
|
|
filename=$i
|
2024-02-10 12:38:38 +01:00
|
|
|
filename_with_zero="0$i"
|
|
|
|
|
2024-02-09 10:42:36 +01:00
|
|
|
file="$dir/GF$filename.JPG"
|
2024-02-10 12:38:38 +01:00
|
|
|
file_with_zero="$dir/GF$filename_with_zero.JPG"
|
|
|
|
|
|
|
|
file_assemblage="/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/hugin_assemblages_script_output/assemblage_$i.jpg"
|
|
|
|
|
|
|
|
file_assemblage_with_zero="/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/hugin_assemblages_script_output/assemblage_0$i.jpg"
|
2023-10-31 16:17:23 +01:00
|
|
|
|
2024-02-12 11:34:28 +01:00
|
|
|
|
2024-02-10 12:38:38 +01:00
|
|
|
|
|
|
|
# test with previous zero
|
|
|
|
if [ -f "$file_with_zero" ] && [ -f "$file_assemblage_with_zero" ]; then
|
|
|
|
echo "set the tags in assemblage $i from GF$filename_with_zero.jpg"
|
|
|
|
exiftool -tagsFromFile "$file_with_zero" $file_with_zero $file_assemblage_with_zero -overwrite_original
|
|
|
|
echo "updated the exift tags of $file_assemblage_with_zero"
|
|
|
|
else
|
|
|
|
echo "batch_exif_photos: File $file_with_zero does not exist."
|
2024-02-12 11:34:28 +01:00
|
|
|
if [ -f "$file" ] && [ -f "$file_assemblage" ]; then
|
|
|
|
echo "set the tags in assemblage $i from GF$filename.jpg"
|
|
|
|
exiftool -tagsFromFile "$file" $file $file_assemblage -overwrite_original
|
|
|
|
echo "updated the exift tags of $file_assemblage"
|
|
|
|
else
|
|
|
|
echo "batch_exif_photos: File $file does not exist."
|
|
|
|
fi
|
2024-02-10 12:38:38 +01:00
|
|
|
fi
|
2023-10-31 16:17:23 +01:00
|
|
|
done
|
2024-02-07 22:30:01 +01:00
|
|
|
|
2024-02-12 11:34:28 +01:00
|
|
|
echo "# fin des assemblages exif de $1 à $2"
|
2023-10-31 16:17:23 +01:00
|
|
|
}
|
|
|
|
|
2023-11-23 14:10:45 +01:00
|
|
|
batch_exif_photos $1 $2 $3
|
2024-02-12 11:34:28 +01:00
|
|
|
|
|
|
|
bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/move_batch.sh $1 $2
|
|
|
|
bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/remove_pto_batch.sh $1 $2
|