From 7de64ae953bfadedf505b18e51315646edc45b3c Mon Sep 17 00:00:00 2001 From: Tykayn Date: Sat, 24 Feb 2024 10:27:55 +0100 Subject: [PATCH] up count before 100 000 capture --- hugin-gopro-fusion/exif_batch.sh | 30 +++++++++++++++++++++++------- hugin-gopro-fusion/main.ts | 16 ++++++++++------ hugin-gopro-fusion/move_batch.sh | 2 +- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/hugin-gopro-fusion/exif_batch.sh b/hugin-gopro-fusion/exif_batch.sh index d840a41c..3b0f3e64 100755 --- a/hugin-gopro-fusion/exif_batch.sh +++ b/hugin-gopro-fusion/exif_batch.sh @@ -37,19 +37,35 @@ function batch_exif_photos { # test with previous zero + if [ -f "$file_assemblage_with_zero" ]; then + echo "." + else + echo "missing assemblage with zero $file_assemblage_with_zero" + fi + if [ -f "$file_assemblage" ]; then + echo "." + else + echo "missing assemblage $file_assemblage_with_zero" + fi 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." - if [ -f "$file" ] && [ -f "$file_assemblage" ]; then + echo "/!\ batch_exif_photos: File with zero: + $file_with_zero + does not exist." +# 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 +# else +# echo "/!\ batch_exif_photos: File: +# $file +# OR assemblage: +# $file_assemblage +# does not exist." +# fi fi done @@ -58,5 +74,5 @@ function batch_exif_photos { batch_exif_photos $1 $2 $3 - 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 +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 diff --git a/hugin-gopro-fusion/main.ts b/hugin-gopro-fusion/main.ts index ba0a1729..28a83e90 100644 --- a/hugin-gopro-fusion/main.ts +++ b/hugin-gopro-fusion/main.ts @@ -34,12 +34,16 @@ let outputStitchedFolder = base_gopro_folder + '/hugin_assemblages_script_output if (mini_arguments['addExifToolInScript']) { addExifToolInScript = mini_arguments['addExifToolInScript'] } -if (mini_arguments['previous_zero']) { - previous_zero = '0' -} if (mini_arguments['goproMin']) { goproMin = mini_arguments['goproMin'] } +if(goproMin < 100000){ + previous_zero = '0' +} +if (mini_arguments['previous_zero']) { + previous_zero = '0' +} +console.log('# prise en compte du zéro? ', previous_zero) if (mini_arguments['goproSubFolder']) { gopro_fusion_separated_photos_folder = mini_arguments['goproSubFolder'] } @@ -179,7 +183,7 @@ function makeBashScriptHugin(minmax: any) { console.log('# fin de l\'écriture des '+count_pto_made_files+' fichiers PTO') } - let hugin_batch_command = 'bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/exif_batch.sh ' + goproMin + ' ' + goproMax + let hugin_batch_command = 'bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/exif_batch.sh ' + goproMin + ' ' + goproMax + ' ' + gopro_fusion_separated_photos_folder @@ -211,8 +215,8 @@ function makeBashScriptHugin(minmax: any) { */ function makePto(absolutePath: string, currentNumber: string):string { - let front_picture_name = absolutePath + '/GF' + currentNumber + '.' + extension_photo_source; - let back_picture_name = absolutePath + '/GB' + currentNumber + '.' + extension_photo_source; + let front_picture_name = absolutePath + '/GF' + currentNumber + '.' + extension_photo_source; + let back_picture_name = absolutePath + '/GB' + currentNumber + '.' + extension_photo_source; // console.log('# front_picture_name', front_picture_name) diff --git a/hugin-gopro-fusion/move_batch.sh b/hugin-gopro-fusion/move_batch.sh index 2385db8c..4da68925 100755 --- a/hugin-gopro-fusion/move_batch.sh +++ b/hugin-gopro-fusion/move_batch.sh @@ -32,4 +32,4 @@ done echo "dossier de destination: $dst_dir" # supprimer les fichiers pto -bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/remove_pto_batch.sh $start_num $end_num +# bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/remove_pto_batch.sh $start_num $end_num