Télécharger facilement des photos

Pour divers besoins, j’aimerais pouvoir facilement télécharger plusieurs séquences disponibles sur Panoramax depuis l’outil en ligne de commande panoramx_cli.

La commande panoramax_cli download --api-url https://panoramax.openstreetmap.fr --collection... fonctionne plutôt bien, le seul souci : trouver l’identifiant des séquences “facilement”.

Existe-t-il un autre moyen que de passer par une commande curl ?
Dans l’idéal il faudrait que je puisse filtrer sur un utilisateur, et une date/deux dates :grinning_face_with_smiling_eyes:


--user pseudo erreur

Par ailleurs, la commande panoramax_cli download --api-url https://panoramax.openstreetmap.fr --user Nzau renvoie une erreur, mais il manque peut-être un argument ?

panoramax_cli download --api-url https://panoramax.openstreetmap.fr --user 'Nzau'
╭─────────────────────────────────────────── Error while downloading pictures ────────────────────────────────────────────╮
│ Impossible to find user Nzau                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

EDIT
Il faut utiliser l’identifiant de l’utilisateur.
Mais où trouver l’identifiant “facilement” sans passer par curl ?

Si cela en intéresse d’autres, grâce à quelques outils, j’ai réussi à trouver ce dont j’avais besoin grâce à la commande suivante :

curl -s "https://panoramax.openstreetmap.fr/api/users/0a5d5370-cc2c-426e-bef7-b9bda806062b/collection" | jq '.links[] | select(.rel == "child" and (.extent.temporal.interval[0][0] // "" | startswith("2025-05-30")))'
Le résultat
{
  "created": "2025-06-03T20:41:11.630460+00:00",
  "extent": {
    "spatial": {
      "bbox": [
        [
          -1.2606057,
          46.0839896,
          -1.0932033,
          46.1767768
        ]
      ]
    },
    "temporal": {
      "interval": [
        [
          "2025-05-30T14:04:54.100000+00:00",
          "2025-05-30T15:03:35.894000+00:00"
        ]
      ]
    }
  },
  "geovisio:length_km": 21.325,
  "href": "https://panoramax.openstreetmap.fr/api/collections/c93e3d8b-2252-4879-8c46-c4cec85602d8",
  "id": "c93e3d8b-2252-4879-8c46-c4cec85602d8",
  "rel": "child",
  "stats:items": {
    "count": 4634
  },
  "title": "2025-05-30",
  "updated": "2025-06-04T00:20:05.878593+00:00"
}
{
  "created": "2025-06-03T19:31:35.978604+00:00",
  "extent": {
    "spatial": {
      "bbox": [
        [
          -1.2605684,
          46.1618537,
          -1.1880739,
          46.1767927
        ]
      ]
    },
    "temporal": {
      "interval": [
        [
          "2025-05-30T13:37:51.100000+00:00",
          "2025-05-30T13:56:01.123000+00:00"
        ]
      ]
    }
  },
  "geovisio:length_km": 7.088,
  "href": "https://panoramax.openstreetmap.fr/api/collections/e63e526d-8d68-4176-9149-0011f3fda06a",
  "id": "e63e526d-8d68-4176-9149-0011f3fda06a",
  "rel": "child",
  "stats:items": {
    "count": 1609
  },
  "title": "2025-05-30",
  "updated": "2025-06-04T00:20:04.430364+00:00"
}
{
  "created": "2025-06-03T19:04:15.331057+00:00",
  "extent": {
    "spatial": {
      "bbox": [
        [
          -1.1886058,
          46.1582181,
          -1.1547639,
          46.165577
        ]
      ]
    },
    "temporal": {
      "interval": [
        [
          "2025-05-30T13:26:15.100000+00:00",
          "2025-05-30T13:36:57.296000+00:00"
        ]
      ]
    }
  },
  "geovisio:length_km": 3.103,
  "href": "https://panoramax.openstreetmap.fr/api/collections/e63a30de-5b84-4966-b46f-a306425f8fa9",
  "id": "e63a30de-5b84-4966-b46f-a306425f8fa9",
  "rel": "child",
  "stats:items": {
    "count": 746
  },
  "title": "2025-05-30",
  "updated": "2025-06-04T00:20:37.809012+00:00"
}
{
  "created": "2025-06-03T18:51:51.924890+00:00",
  "extent": {
    "spatial": {
      "bbox": [
        [
          -1.1635871,
          46.0828042,
          -1.0929471,
          46.1582028
        ]
      ]
    },
    "temporal": {
      "interval": [
        [
          "2025-05-30T12:43:10.100000+00:00",
          "2025-05-30T13:23:37.305000+00:00"
        ]
      ]
    }
  },
  "geovisio:length_km": 14.685,
  "href": "https://panoramax.openstreetmap.fr/api/collections/928c0aa8-9203-438b-bffb-5c8e2a0751d0",
  "id": "928c0aa8-9203-438b-bffb-5c8e2a0751d0",
  "rel": "child",
  "stats:items": {
    "count": 3073
  },
  "title": "2025-05-30",
  "updated": "2025-06-04T00:20:38.067049+00:00"
}

Et pour trouver l’id du nom d’utilisateur

curl -s "https://panoramax.openstreetmap.fr/api/users/search?q=Nzau" | jq .
La réponse à la commande
{
  "features": [
    {
      "id": "0a5d5370-cc2c-426e-bef7-b9bda806062b",
      "label": "Nzau",
      "links": [
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/0a5d5370-cc2c-426e-bef7-b9bda806062b",
          "rel": "user-info",
          "type": "application/json"
        },
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/0a5d5370-cc2c-426e-bef7-b9bda806062b/collection",
          "rel": "collection",
          "type": "application/json"
        }
      ]
    },
    {
      "id": "0c8a689c-2a17-4d71-9903-6bb1f7e72f3c",
      "label": "[NzN]suriv",
      "links": [
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/0c8a689c-2a17-4d71-9903-6bb1f7e72f3c",
          "rel": "user-info",
          "type": "application/json"
        },
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/0c8a689c-2a17-4d71-9903-6bb1f7e72f3c/collection",
          "rel": "collection",
          "type": "application/json"
        }
      ]
    },
    {
      "id": "4cc265bd-a732-4052-92c7-5afb1afe41a9",
      "label": "Nip",
      "links": [
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/4cc265bd-a732-4052-92c7-5afb1afe41a9",
          "rel": "user-info",
          "type": "application/json"
        },
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/4cc265bd-a732-4052-92c7-5afb1afe41a9/collection",
          "rel": "collection",
          "type": "application/json"
        }
      ]
    },
    {
      "id": "6323f31d-b582-4b22-97f3-29034b072b64",
      "label": "NGlf",
      "links": [
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/6323f31d-b582-4b22-97f3-29034b072b64",
          "rel": "user-info",
          "type": "application/json"
        },
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/6323f31d-b582-4b22-97f3-29034b072b64/collection",
          "rel": "collection",
          "type": "application/json"
        }
      ]
    },
    {
      "id": "970bb7b1-0d07-4d05-81ce-6f55798c5c8d",
      "label": "NH147",
      "links": [
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/970bb7b1-0d07-4d05-81ce-6f55798c5c8d",
          "rel": "user-info",
          "type": "application/json"
        },
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/970bb7b1-0d07-4d05-81ce-6f55798c5c8d/collection",
          "rel": "collection",
          "type": "application/json"
        }
      ]
    },
    {
      "id": "74c4f550-29c6-48da-b23e-15139fbda08e",
      "label": "Niavy",
      "links": [
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/74c4f550-29c6-48da-b23e-15139fbda08e",
          "rel": "user-info",
          "type": "application/json"
        },
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/74c4f550-29c6-48da-b23e-15139fbda08e/collection",
          "rel": "collection",
          "type": "application/json"
        }
      ]
    },
    {
      "id": "1525053a-e334-4ac6-8fb7-1731b0080e1b",
      "label": "Nesim",
      "links": [
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/1525053a-e334-4ac6-8fb7-1731b0080e1b",
          "rel": "user-info",
          "type": "application/json"
        },
        {
          "href": "https://panoramax.openstreetmap.fr/api/users/1525053a-e334-4ac6-8fb7-1731b0080e1b/collection",
          "rel": "collection",
          "type": "application/json"
        }
      ]
    }
  ]
}

On a facilement accès à l’ID de la photo et de la séquence dans le visioneuse:

Pour de l’automatique, l’API interrogée à coup de curl/jq depuis bash permet effectivement de faire à peu près tout ce qu’on veut, voire faire pareil en python (requests/json) ou autre langage d’ailleurs.

Oui c’était plus pour le côté automatisation :grinning_face_with_smiling_eyes:
Merci pour le retour.