-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Any chance you will add the option to name the folder like the post title, or maybe reason why you haven't done it yet?
I have been looking into this myself, right now:
The line that is responsible for the folder name is:
post_folder = os.path.join(posts_folder, post_id)
(kcposts.py line 397)
Getting the post name should also not be a problem, as it's already available from the part of the code that writes into the markdown file.
Some posts don't have a title, in which case it would revert back to the post id.
As for sanitization, one should exclude symbols windows doesn't like, as well as emojis (other non-English letters like Japanese for example should be allowed however).
# remove things windows doesn't like
invalid_chars = r'[\\/:*?"<>|]'
filename = re.sub(invalid_chars, '', filename)
# remove emojis
filename = ''.join(c for c in filename if not unicodedata.category(c).startswith('C'))
Having this feature also prevents one from getting the same post from different services like onlyfans and fansly if a creator uses both, as the name of the folder would directly show you that they are the same.