From 0b767cd7b0e19aac8a2268d18283800a7b8f48ab Mon Sep 17 00:00:00 2001 From: tykayn Date: Tue, 31 Oct 2023 16:17:23 +0100 Subject: [PATCH] add function to copy tags from gopro photo to stitched photos if they exist only Signed-off-by: tykayn --- hugin-gopro-fusion/exif_batch.sh | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 hugin-gopro-fusion/exif_batch.sh diff --git a/hugin-gopro-fusion/exif_batch.sh b/hugin-gopro-fusion/exif_batch.sh new file mode 100755 index 00000000..7f19d68c --- /dev/null +++ b/hugin-gopro-fusion/exif_batch.sh @@ -0,0 +1,33 @@ +#!/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 +################################### +# exemple ./exif_batch.sh 36077 36159 + +function batch_exif_photos { + local min=$1 + local max=$2 + local dir="/home/poule/encrypted/stockage-syncable/photos/gopro/rouen_oct23" + + echo $(seq $min $max) + + for i in $(seq $min $max); do + filename=$i + file="$dir/GF0$filename.JPG" + file_assemblage="/home/poule/encrypted/stockage-syncable/photos/gopro/rouen_sequence_stiched/assemblage_0$i.JPG" + + if [ -f "$file" ] && [ -f "$file_assemblage" ]; then + echo "set the tags in assemblage $i from GF0$filename.JPG" + exiftool -tagsFromFile "$file" $file $file_assemblage -overwrite_original + echo "updated the exift tags of $file_assemblage" + else + echo "File $file does not exist." + fi + done +} + +batch_exif_photos $1 $2 \ No newline at end of file