Open x-wiz opened 1 year ago
Good suggestion.
I attempted to implement this feature in the past. But there are more works to do than I thought.
timestamp
or file-type
.
user-name
can be changed and it is not unique. user-id
isunique, but it can be changed.If you want to make a PR. There are few things need to be done.
Feel free to let me know if you need further information.
Something like elonmusk 1673852066572406784_1-4
would be great too, which would make the resulting filenames compatible with a popular twitter ripper (gallery-dl)
Something like
elonmusk 1673852066572406784_1-4
would be great too, which would make the resulting filenames compatible with a popular twitter ripper (gallery-dl)
@outlaw420 That's another serial pattern could be considered to implement.
In my opinion, I prefer non-space filename especially in CLI environment.
but if you choose _
as seperator it would be confused in some situations, because _
is valid character in twitter id.
I'm no dev but I understand it may cause a conflict in some environments, though it's great for casuals like me. It's up to you but it would be nice to have this option regardless. Thanks!
I'm trying to go from TwMediaDownloader to this extension. The name format seems to work fine, except for the name format at the very end.
It would be nice if we could add a filename option to the end, and customize if there is the extra 0 at the end of the serial to make it fully compatible with the old extension. eg: {userName}-{serial}-{datetime}-img1.jpg (or vid for videos.)
Currently, I have to manually rename those files.
.jpg
and .png
are image. .mp4
is video, I don't think we need one more token to distinguish the file type.
Regarding your comment on July 3, you can take a look at an extension called Powerful Pixiv Downloader.
It can customize naming rules and enter characters that are not available in file names, but it will turn these characters into full-width characters. As for unique file names, it should be strict enough to maintain the existing rules that say "The pattern must include Tweet ID
+ Serial
or Hash
."
But it can be a lot of work. In terms of my personal needs, I currently only need to add a customizable prefix, such as "MH▲-", so that I can distinguish which files are downloaded through your extension.
.jpg
and.png
are image..mp4
is video, I don't think we need one more token to distinguish the file type.
I can use a mass renamer to fix the incompatibility, but it's another step that it would be nice if I could avoid if possible in case I forget.
Regarding your comment on July 3, you can take a look at an extension called Powerful Pixiv Downloader. It can customize naming rules and enter characters that are not available in file names, but it will turn these characters into full-width characters. As for unique file names, it should be strict enough to maintain the existing rules that say "The pattern must include
Tweet ID
+Serial
orHash
."But it can be a lot of work. In terms of my personal needs, I currently only need to add a customizable prefix, such as "MH▲-", so that I can distinguish which files are downloaded through your extension.
You can use Create sub-directory
in options page.
.jpg
and.png
are image..mp4
is video, I don't think we need one more token to distinguish the file type.I can use a mass renamer to fix the incompatibility, but it's another step that it would be nice if I could avoid if possible in case I forget.
If you really need this you can make a PR.
Describe the solution you'd like More customization in Filename Pattern, Like a textbox I can type the layout of the text, the order and also more info.
Example post: https://twitter.com/saltastic_/status/1658472020735303690
Example Filename pattern:
twitter_{user-name}(@{user-id})_{date-time}_{status-id}_{file-type}
output:
twitter_shio(@saltastic_)_20230516-135837_1658472020735303690_photo.jpg