Usage
Upload pictures
The picture upload command is available under the upload subcommand:
If you want to upload pictures from a my_sequence directory to a Panoramax instance (running locally in this example), launch this command:
You can also add a --wait flag to wait while the server processes all the pictures.
Note
You can launch again the same command to recover a partial sequence import, for example if only some pictures failed to upload.
Proxy support
If you are behind a proxy, you can set the HTTP_PROXY/HTTPS_PROXY/ALL_PROXY environment variables to the proxy address.
Authentication
If your Panoramax instance requires a login for the upload, the upload command will ask for a login on the instance by visiting a given url with a browser.
You can also login before hand with the command:
Both will store the credentials in a configuration file, located either in a XDG defined directory or in a user specific .config, in a subdirectory geovisio/config.toml.
If you do not want to use this, you can also provide an API token with the --token parameter.
External metadata
By default, picture metadata are read from EXIF tags of the image file. If they are not set, you can also use a CSV file. This file should be placed in the same directory as pictures, and should be named panoramax.csv. It should contain one line per picture that should have its metadata overriden.
The CSV file should contain the following columns:
| Header | Type | Mandatory ? | Description |
|---|---|---|---|
| file | str | Yes | Exact file name of the picture |
| lon | float | No | WGS84 longitude (for example 55.56 for RΓ©union Island) |
| lat | float | No | WGS84 latitude (for example -21.14 for RΓ©union Island) |
| capture_time | str | No | Capture time of the picture, in RFC 3339 (like 1985-04-12T23:20:50.52Z). If no timezone is given, considered as local time (and thus the date + position would be used to localize it). |
| Exif.* | str | No | Any EXIF tag, with column name following Exiv2 scheme (example Exif.Image.Artist). You can create as many columns as necessary. |
| Xmp.* | str | No | Any XMP tag, with column name following Exiv2 scheme (example Xmp.digiKam.TagsList). You can create as many columns as necessary. |
All metadatas defined in the CSV are optional. If a metadata is not defined in CSV for a given image, Panoramax CLI will try to read it from picture EXIF metadata.
Note
A Panoramax server will always need some metadata to be present (the GPS coordinates and the capture time), no matter where they are read from.
Tip
If you want to manage finely your pictures metadata, we recommend using Exiftool, which is a command-line utility for managing EXIF tags. For example, to add tags to all pictures in some directory:
So in a broader process of managing pictures, you can first edit tags using Exiftool, then upload them with Panoramax CLI.
Upload status
Prints the status of an upload set.
You can also add a --wait flag to wait for all the pictures to be processed.
Download pictures
You can easily down pictures from a panoramax instance with the download subcommand.
You can download the pictures from a specific collection:
panoramax_cli download --api-url https://my.panoramax.server/ --collection "12345678-94c5-4c13-871f-0c82e24e3fc6" --path ./downloaded_pictures
or all the pictures of a user:
panoramax_cli download --api-url https://my.panoramax.server/ --user "12345678-94c5-4c13-871f-0c82e24e3fc6" --path ./downloaded_pictures
or your own pictures with the user id me (it will require a login):
panoramax_cli download --api-url https://my.panoramax.server/ --user me --path ./downloaded_pictures
Transfer pictures
You can transfer pictures from one Panoramax instance to another with the migration subcommand.
Warning
There was a deprecated transfer command for this before, but it has been replaced by the migration command, that transfers pictures directly from one instance to another, without downloading them on the client side. The transfer is handled by the destination instance, and the destination instance should be at least at version 2.16.0 to handle it.
You can transfer a specific collection:
panoramax_cli migration --from-api-url https://my.old.panoramax.server/ --to-api-url https://my.new.shiny.panoramax.server/ --from-collection "12345678-94c5-4c13-871f-0c82e24e3fc6"
or all the pictures of a user:
panoramax_cli migration --from-api-url https://my.old.panoramax.server/ --to-api-url https://my.new.shiny.panoramax.server/ --user "12345678-94c5-4c13-871f-0c82e24e3fc6"
or your own pictures with the user id me (it will require a login):
panoramax_cli migration --from-api-url https://my.old.panoramax.server/ --to-api-url https://my.new.shiny.panoramax.server/ --user me
This is done asynchronously by the destination instance (the command can be stopped after the migrations tasks have been sent), and the transfer status can be polled using the --wait flag or the migration-status command.
Note
The migration doesn't delete the sequences on the origin instance, you need to delete them manually after checking that all has been correctly transfered.
Migration status
You can check the status of a migration using the migration-status command:
You can also check all the ongoing migrations of a given user with:
panoramax_cli migration-status --api-url https://my.new.shiny.panoramax.server/ --user "12345678-94c5-4c13-871f-0c82e24e3fc6"
Or you own ongoing migrations:
Cleaning up after a migration
After the migration has been completed by the server, you can check that the data has been correctly transferred and if so, you can delete it from the original instance with:
panoramax_cli delete --api-url https://my.old.panoramax.server/ --collection "12345678-94c5-4c13-871f-0c82e24e3fc6"
or all the pictures of a user:
panoramax_cli delete --api-url https://my.old.panoramax.server/ --all-collections-of-user "12345678-94c5-4c13-871f-0c82e24e3fc6"
or your own pictures with the user id me: