new feature: preserve document time as file mtime #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Metadata is always nice to have, but having it, we should also use it. Specifically, set the file mtime to the document date. Actually, I even think that should be the default option. The download time is still available in other attributes, but I don't really see where it'd be important.
This might just as well fit into
rename_after_download
which should then bepostprocess_after_download
, but I had no strong preference so it landed in cli.py.Up to now I didn't check whether the date attribute acutally exists. I guess it should for any document.
Regarding click options: I find it strange to supply "=true" to bool options. Imho such options should be simple switches to enable the non-default behaviour (e.g. also in
--headless
) -- which is common for a lot of other programs. However, for now I've kept with the existing style.