rfcx / arbimon

Ecoacoustic analysis platform empowering conservationists to analyze acoustic data and to derive insights about the ecosystem at scale
https://arbimon.org
Apache License 2.0
0 stars 1 forks source link

Change recording filenames in project backup download #2015

Closed LucyDimitrova closed 3 weeks ago

LucyDimitrova commented 4 weeks ago

Context

Currently, the download script downloads files with the filename stored in S3. However, for the recording files users might find these filenames confusing and hard to navigate and figure out which file belongs to which recording.

Task

When downloading the recording files, generate a filename for each file using the format [TIMESTAMP]_[RECORDING_ID].[EXTENSION], where TIMESTAMP is datetime in the database. Each recording file should be downloaded in a subfolder for the corresponding site_id (already implemented).

Notes

As far as I know, there's no way for people to collaborate on gists, but I guess a new gist can be created with the new changes.

LucyDimitrova commented 4 weeks ago

I've added the newest changes to the script to allow saving the recording files with the new generated filename and moved around the try/catch block to handle/skip items that had an error during download.

@koonchaya, this can be tested now using the script (the link is the same).

koonchaya commented 3 weeks ago

Current recording filenames

Image

koonchaya commented 3 weeks ago

@LucyDimitrova the filename format would be better like this [YYYMMDD_HHMMSS]-[r4ecording id].[extension] For example: 20180420_063348-3300978.flac

LucyDimitrova commented 3 weeks ago

Fixed.

koonchaya commented 3 weeks ago

Updated filename format

Image