-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Set file modified time to tweet time #80
Comments
The modified time was managed by the browser or the file system, extension can't specify them. This feature might be related to #55 . |
Thanks. As soon as we can add datetime to the filename (after #74), I can at least use a local script to modify them in batch, so not a big deal (which is also to say that timestamp is definitely not useless in filename). |
You can always modify them manually: Like in Python: from os import utime
from datetime import datetime
from pathlib import Path
def update_mtime(f, mtime=None):
f = Path(f)
if mtime is None:
mtime = datetime.now()
current_mtime = datetime.fromtimestamp(f.stat().st_mtime)
print(f'{f.name}: {current_mtime.isoformat()} -> {mtime.isoformat()}')
mtime_unix = int(mtime.timestamp())
utime(f, (mtime_unix, mtime_unix)) (You can even modify creation time, but that's more complicated.) |
Tweet time pattern was introduced in |
Is your feature request related to a problem? Please describe.
Set the modified time of downloaded items to its tweet time.
Additional context
It is very useful to manage large amount of medias. You can sort by filename to group files by username and sort by modified date to order them in chronological order.
I don't know if it's even possible with download API, though.
The text was updated successfully, but these errors were encountered: