To avoid to download everything at once, this is a 2 steps process:
- 1/ We set a list of users for which we want to get the list of sequences to download, and get a bash script for each user.
Change the list of users in the batch file `batch_get_username.sh`.
change the access token with your access token and the sequence ids with the ids of the sequences you want to download
```bash
usernames=( "someone_having_nice_pictures" "someone_else" "oh_look_a_these_usernames" ) # use real accounts, it might work better
```
This will give you a few files that the other scripts will use to generate a script to download all sequences of each user. One user, one bash script generated.
- 2/ We can launch the download of all the sequences of a user for every user specified in the batch script.
**Or all of the generated batch scripts at once.**
```bash
bash script_bash_get_sequences_for_user_*
```
Don't worry if you rerun the same user `script_bash_get_sequences_for_user_someone.sh` twice, the pictures will not be downloaded twice. Every run of mapillary_download.py checks that pictures are not existing before willing to download them.
### Get only one sequence with its ID
To find a sequence id you can use the batch script, or click on a sequence on the Mapillary website, click on a picture, click on advanced data, and copy the sequence ID.
Running the script will check in the /data folder for every user sequences and move the files being in the bouding boxes in the `destination` folder path of the script.
On windows you can create a virtual environnement too, or use the prebuilt `mapillary_download.exe` available on the release page.
## How to batch the upload to panoramax
After having downloaded the sequences of a user you will find them in the folder `data`.
go in your `data` folder, and to the user subfolder, and assuming you have already sent pictures with geovisio_cli, you can run this command to send all the sequences of the current folder you're in:
```Shell
cd data/some_user
for dir in */; do dir=${dir%?} ; geovisio upload --api-url https://panoramax.openstreetmap.fr "$dir" --token=BLAH_BLAH ; done