From 5ab6995d4ebdacd278c34375a3993fbae293113a Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 20 Sep 2023 17:33:48 +0200 Subject: [PATCH] panoramax count --- panoramax/count_files_photos.sh | 3 +++ panoramax/count_my_photos_panoramax.js | 14 ++++++++++++++ panoramax/panoramax_bash_send.sh | 10 ++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/panoramax/count_files_photos.sh b/panoramax/count_files_photos.sh index e69de29b..28d5d7f2 100644 --- a/panoramax/count_files_photos.sh +++ b/panoramax/count_files_photos.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# count files recursively in provided folder +alias countf='echo "fichiers ici:" $(ls -d * | xargs -n1 ls | wc -l)' diff --git a/panoramax/count_my_photos_panoramax.js b/panoramax/count_my_photos_panoramax.js index e69de29b..2da49c75 100644 --- a/panoramax/count_my_photos_panoramax.js +++ b/panoramax/count_my_photos_panoramax.js @@ -0,0 +1,14 @@ +/** + * script à copier dans la console du navigateur pour récupérer les décomptes + */ + +let sum = 0; +let counters = document.querySelectorAll('.bi-images + span') +counters.forEach(elem => { + let inner = elem.innerText; + if (parseInt(inner)) { + sum += inner * 1 + } +}) +document.querySelector('h1.sequences-title').innerHTML = 'Mes séquences: '+sum+' photos' +console.log(sum) \ No newline at end of file diff --git a/panoramax/panoramax_bash_send.sh b/panoramax/panoramax_bash_send.sh index 51707351..3a7908c8 100755 --- a/panoramax/panoramax_bash_send.sh +++ b/panoramax/panoramax_bash_send.sh @@ -11,8 +11,8 @@ # # ---------------------------- made by tykayn www.cipherbliss.com ----------------------------- -containing_mapillary_folders="/home/poule/encrypted/stockage-syncable/photos/imagerie kartaview carto tel/mapillary" -done_mapillary_folders="/home/poule/encrypted/stockage-syncable/photos/imagerie kartaview carto tel/already_sent_to_panoramax_osm_fr" +containing_mapillary_folders="/home/poule/encrypted/stockage-syncable/photos/imagerie kartaview carto tel/mapillary_download_script" +# done_mapillary_folders="/home/poule/encrypted/stockage-syncable/photos/imagerie kartaview carto tel/already_sent_to_panoramax_osm_fr" panoramax_instance="https://panoramax.openstreetmap.fr" function import_mapillary_folders_and_move_in_imported_folder() { @@ -23,9 +23,11 @@ function import_mapillary_folders_and_move_in_imported_folder() { ls -l |wc -l echo " " # loop in containing folder - for f in *; do + for f in ./*; do echo "envoi du dossier" "$containing_mapillary_folders/$f" - geovisio upload --api-url $panoramax_instance "$containing_mapillary_folders/$f" + echo $f + cd "$containing_mapillary_folders/$f" + geovisio upload --api-url $panoramax_instance . # mv "$containing_mapillary_folders/$f" "$done_mapillary_folders" done }