Skip to content
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

added options to normalize text, escape text, and optimize for disk v… #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thisismycontributionaccount

…iewing

This is for issue #159 . I was having a similar issue with special characters as well as with tag upper/lower case.

I have added three new options and the code to implement the options.

--normalize-tags - sets the text to lower case and creates a unique set to remove duplicates
--escape-tags - uses urllib.quote_plus to escape special characters in the tags
--fix-for-disk - adds an extra urllib.quote_plus when the urls are being built to account for browsing from disk weirdness in windows

…iewing

This is for issue bbolli#159 .  I was having a similar issue with special characters as well as with tag upper/lower case.

I have added three new options and the code to implement the options.  

--normalize-tags - sets the text to lower case and creates a unique set to remove duplicates
--escape-tags - uses urllib.quote_plus to escape special characters in the tags
--fix-for-disk - adds an extra urllib.quote_plus when the urls are being built to account for browsing from disk weirdness in windows
@cebtenzzre
Copy link
Collaborator

So, why would you not want to escape special characters in tags? I think we should unconditionally avoid things that crash tumblr-utils, like trying to create directories with invalid names.
Also, I think this could still create filenames that are invalid on Windows, e.g anything ending in a period.

@thisismycontributionaccount
Copy link
Author

There is only so much you can code for. :-)

I would agree about creating directories without special characters. The only place I see that happening is in the tag creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants