From adfad823ea4716ee3bec985a3cf4d8afb5a67f1f Mon Sep 17 00:00:00 2001 From: wissam antoun Date: Wed, 1 Jul 2020 15:59:59 +0300 Subject: [PATCH] fixed issue with spaces in rename --- pdf_renamer/rename_pdf_files_from_content_title_or_arxiv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf_renamer/rename_pdf_files_from_content_title_or_arxiv.py b/pdf_renamer/rename_pdf_files_from_content_title_or_arxiv.py index b6258e1..4116c1e 100644 --- a/pdf_renamer/rename_pdf_files_from_content_title_or_arxiv.py +++ b/pdf_renamer/rename_pdf_files_from_content_title_or_arxiv.py @@ -22,7 +22,7 @@ def get_valid_filename(s): Copyright (c) Django Software Foundation and individual contributors. All rights reserved. """ - return re.sub(r'(?u)[^-\w.]', '', s) + return re.sub(r'(?u)[^-\w. ]', '', s) #%% all_files_names = glob.glob("C:\\Users\\WISSAM-PC\\Downloads\\Documents\\*.pdf")