wmo-im / wis2downloader

The backend Python package for downloading real-time data from the WIS2 network.
Apache License 2.0
1 stars 1 forks source link

how to deal with filenames when downloading data from WIS2 ? #19

Open maaikelimper opened 5 months ago

maaikelimper commented 5 months ago

When using the filename from the URL and subscribing to cache, we noted that depending on which cache was used, files may or may not have a file-extension: image

When subscribing to origin we also noted for data-providers like de-dwd we end up with ',' in the filename extracted from the URL: image

Dave experimented with using a hashed data-id plus extension extracted from mimetype, which ends up with filenames that offer no information whatsoever about the content:

image

(in this example I self-subscribed and published test-data, in the downloaded result I lose the convenient naming convention of the bufr process used in wis2box!)

Discussing with Enrico he suggested that as a user you would at least want to get "datetime" include in the filename, which may or may not be included in the original URL, but could be parsed from the message-properties.

@tomkralidis what would you suggest based on your experience on users using pywis-pubsub for downloading data ?