Closed pietern closed 2 years ago
Before:
Writing: ./nws/2022-01-27/20220127T110000Z_20220327110045-pac24_latestBW.gif
Writing: ./nws/2022-01-27/20220127T110000Z_20220327110045-pacsfc72_latestBW.gif
Writing: ./nws/2022-01-27/20220127T110000Z_20220327110046-pac48per_latestBW.gif
Writing: ./nws/2022-01-27/20220127T110000Z_20220327110046-hiwind_pac_latest.gif
Writing: ./nws/2022-01-27/20220127T110000Z_20220327110046-hiwind_atl_latest.gif
Writing: ./nws/2022-01-27/20220127T110000Z_20220327110046-pac48_latestBW.gif
After:
Writing: ./nws/2022-03-27/20220327T110045Z_pac24_latestBW.gif
Writing: ./nws/2022-03-27/20220327T110045Z_pacsfc72_latestBW.gif
Writing: ./nws/2022-03-27/20220327T110046Z_pac48per_latestBW.gif
Writing: ./nws/2022-03-27/20220327T110046Z_hiwind_pac_latest.gif
Writing: ./nws/2022-03-27/20220327T110046Z_hiwind_atl_latest.gif
Writing: ./nws/2022-03-27/20220327T110046Z_pac48_latestBW.gif
The pattern that encodes the timestamp for NWS images used to be irregular and required careful parsing. This pattern was changed some time before November 2020 and became regular. The irregular parser produced invalid timestamps when applied to filenames with the new pattern. This commit updates the function that extracts a timestamp from the filename to expect the regular pattern.
This commit also removes the timestamp prefix from the filename if it could be extracted, allowing users to specify their own timestamp pattern.
This means that a handler with the following definition:
No longer produces filenames:
But rather:
Fixes #100.