scripts/panoramax/panoramax_bash_send.sh
2023-08-14 12:22:05 +02:00

34 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# ---------------------------------------------------------------------------------------------
# envoi de plusieurs dossiers de photos (exportés de mapillary) vers panoramax
# fonctionne avec un dossier contenant les dossiers de photos de mapillary
# déplace les dossiers importés dans un autre afin d'effectuer un suivi progresssif
#
# ---------------- usage:
# changez les variables suivantes, puis lancez la commande bash:
#
# bash panoramax_bash_send.sh
#
# ---------------------------- 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"
panoramax_instance="https://panoramax.openstreetmap.fr"
function import_mapillary_folders_and_move_in_imported_folder() {
echo 'change directory to' $containing_mapillary_folders
cd $containing_mapillary_folders
echo "dossiers à envoyer: "
ls -l |wc -l
echo " "
# loop in containing folder
for f in *; do
echo "envoi du dossier" "$containing_mapillary_folders/$f"
geovisio upload --api-url $panoramax_instance "$containing_mapillary_folders/$f"
# mv "$containing_mapillary_folders/$f" "$done_mapillary_folders"
done
}
import_mapillary_folders_and_move_in_imported_folder