mirror of
https://github.com/yihong0618/Kindle_download_helper.git
synced 2025-11-22 07:59:04 +08:00
Merge pull request #136 from nomanfound/patch-1
remove illegal chars in file name
This commit is contained in:
@@ -19,4 +19,7 @@ def replace_readme_comments(file_name, comment_str, comments_name):
|
||||
|
||||
|
||||
def trim_title_suffix(title):
|
||||
return re.sub(r"(([^)]+)?|【[^】]+】?)", "", title)
|
||||
new_title=re.sub(r"(([^)]+)?|【[^】]+】?)", "", title)
|
||||
for ch in '\/:*?"<>|':
|
||||
new_title = new_title.replace(ch, "-")
|
||||
return new_title
|
||||
|
||||
Reference in New Issue
Block a user