From c8404cdd545eaa53f4a59b78963d054ff257ad8f Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 24 Oct 2024 00:01:05 +0200 Subject: [PATCH] add panormax cli Signed-off-by: Matthias --- README.md | 7 +++++-- requirements.txt | 3 ++- secrets_variables_example.sh | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f6a92a8..e151368 100644 --- a/README.md +++ b/README.md @@ -102,9 +102,10 @@ git clone https://github.com/Stefal/mapillary_download.git cd mapillary_download python3 -m venv mly_venv source mly_venv/bin/activate +source secrets_variables.sh python -m pip install -r requirements.txt ``` -Then you can run `python mapillary_download.py "MLY|xxxx|xxxxxxx" --sequence_ids xxxxxxxxxxx` +Then you can run `python mapillary_download.py $MAPILLARY_DEV_TOKEN --sequence_ids xxxxxxxxxxx` When you're done with the script, simply run `deactivate` to exit the virtual environnement. On windows you can create a virtual environnement too, or use the prebuilt `mapillary_download.exe` available on the release page. @@ -117,8 +118,10 @@ go in your `data` folder, and to the user subfolder, and assuming you have alrea ```Shell +source mly_venv/bin/activate +source secrets_variables.sh cd data/some_user -for dir in */; do dir=${dir%?} ; geovisio upload --api-url https://panoramax.openstreetmap.fr "$dir" --token=BLAH_BLAH ; done +for dir in */; do dir=${dir%?} ; panoramax_cli upload --api-url https://panoramax.openstreetmap.fr "$dir" --token=$PANORAMAX_DEV_TOKEN ; done ``` Have fun! diff --git a/requirements.txt b/requirements.txt index 934cbed..4db3c20 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ requests >= 2.28.2 pytz >= 2023.3 timezonefinder >=6.2.0 -pyexiv2 >= 2.8.2 \ No newline at end of file +pyexiv2 >= 2.8.2 +panoramax_cli >= 1.1.1 diff --git a/secrets_variables_example.sh b/secrets_variables_example.sh index d3f9e23..68ff40a 100644 --- a/secrets_variables_example.sh +++ b/secrets_variables_example.sh @@ -5,3 +5,7 @@ # register an application at https://www.mapillary.com/dashboard/developers # read permissions needed, all other fields can be random. copy the client token export MAPILLARY_DEV_TOKEN="MLY|blahblah_replace_it" + +# Panoramax +# copy the token from your profile settings at https://panoramax.openstreetmap.fr/settings +export PANORAMAX_DEV_TOKEN="yourtokenhere"