From 6ee25170d7031a77c3bfe6655cf3afe8bf7a5f8a Mon Sep 17 00:00:00 2001 From: Tykayn Date: Mon, 12 Feb 2024 10:41:44 +0100 Subject: [PATCH] add removing pto --- hugin-gopro-fusion/main.ts | 4 ++++ hugin-gopro-fusion/move_batch.sh | 3 +++ hugin-gopro-fusion/remove_pto_batch.sh | 17 +++++++---------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/hugin-gopro-fusion/main.ts b/hugin-gopro-fusion/main.ts index 44e5dee9..ba0a1729 100644 --- a/hugin-gopro-fusion/main.ts +++ b/hugin-gopro-fusion/main.ts @@ -190,8 +190,12 @@ function makeBashScriptHugin(minmax: any) { console.log('# ##############\n# pour lancer le script : \n', 'bash /home/poule/encrypted/stockage-syncable/photos/imageries/gopro/INBOX_PTO_hugin/hugin_executor_from_' + goproMin + '_to_' + goproMax + '.sh', '\n' + + '\n # fusion des infos exif:' + ' bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/exif_batch.sh ' + goproMin + ' ' + goproMax + ' ' + gopro_fusion_separated_photos_folder, '\n' + + '\n # déplacement en masse des fichiers assemblés:' + + ' bash /home/poule/encrypted/stockage-syncable/www/development/html/scripts/hugin-gopro-fusion/move_batch.sh ' + goproMin + ' ' + goproMax + ' ' + gopro_fusion_separated_photos_folder, + '\n' + '\n##############\n' ) diff --git a/hugin-gopro-fusion/move_batch.sh b/hugin-gopro-fusion/move_batch.sh index 924b56c5..e68c2f8b 100755 --- a/hugin-gopro-fusion/move_batch.sh +++ b/hugin-gopro-fusion/move_batch.sh @@ -28,3 +28,6 @@ for i in $(seq -f "%03g" ${start_num} ${end_num}); do echo "Fichier '${src_file}' introuvable." fi done + +# 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 diff --git a/hugin-gopro-fusion/remove_pto_batch.sh b/hugin-gopro-fusion/remove_pto_batch.sh index 924b56c5..71d63ebd 100755 --- a/hugin-gopro-fusion/remove_pto_batch.sh +++ b/hugin-gopro-fusion/remove_pto_batch.sh @@ -9,22 +9,19 @@ fi start_num="$1" end_num="$2" -src_base_name="assemblage_" -new_folder="from_$start_num" +src_base_name="merging_" -# Créer un nouveau dossier dans dst_dir -dst_dir="/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/A_ORIENTER/${new_folder}_to_$(printf '%03d\n' "$end_num")" -mkdir -p "${dst_dir}" # Déplacer des fichiers depuis le répertoire actuel vers le nouveau dossier for i in $(seq -f "%03g" ${start_num} ${end_num}); do - src_file="${src_base_name}${i}.jpg" - dst_file="${dst_dir}/${src_file}" + src_file="${src_base_name}${i}.pto" - if [ -f "/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/hugin_assemblages_script_output/${src_file}" ]; then - mv -- "/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/hugin_assemblages_script_output/${src_file}" "${dst_file}" - echo "Déplacé ${src_file} -> ${dst_file}" + if [ -f "/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/INBOX_PTO_hugin/${src_file}" ]; then + rm -rf "/home/poule/encrypted/stockage-syncable/photos/imageries/gopro/INBOX_PTO_hugin/${src_file}" + count=$((count+1)) else echo "Fichier '${src_file}' introuvable." fi done + +echo "Nombre de fichiers PTO supprimés : ${count}"