-
Notifications
You must be signed in to change notification settings - Fork 345
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
Alternative folder for repost images and -norepost command line argument #93
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice feature. Thanks for your contribution.
target_folder_base = os.path.join(current_folder, site) | ||
if not os.path.isdir(target_folder_base): | ||
os.mkdir(target_folder_base) | ||
target_folder_other = os.path.join(current_folder, site+'-other') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using the origin site name as the new folder name? And we could avoid downloading the duplicate photos/videos as well.
I mean if the media in A is reblogged from B, you can just create a new folder B to store this media, instead of current A-other
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not comfortable when threre ara many reposts from many different blogs and a user need to see lot of photos / videos...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not comfortable when threre ara many reposts from many different blogs and a user need to see lot of photos / videos...
Still use A and B as an example.
A: media1
media2 (rebloged from B)
B: media2 (rebloged from C)
media3
What if a user is trying to downloading media2 from site A, you will save it to A-other
folder. And later if downloading from site B, media2
will be downloaded again and save to B-other
folder.
Actually they are identical, which should not be save multiple times.
Then why not directly saving it to folder C
(for site C)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe... I made this feature for me and it's bad for me what you say.
@@ -201,6 +204,13 @@ def _download_media(self, site, medium_type, start): | |||
data = xmltodict.parse(xml_cleaned) | |||
posts = data["tumblr"]["posts"]["post"] | |||
for post in posts: | |||
if '@reblogged-from-url' in post: | |||
target_folder=target_folder_other | |||
if len (sys.argv) > 2 and sys.argv[2] == '-norepost': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better add some help message on this new flag in the main function.
Update README as well please.
No description provided.