remove non words

populat_orgs
Castro0o 5 years ago
parent b441df8ba0
commit 69fc3f2ec5

@ -3,6 +3,12 @@ import subprocess
from datetime import datetime from datetime import datetime
def remove_nonwords(imgname):
filename, ext = os.path.splitext(imgname) # split into filename & extension
filename = re.sub(r'\W', '', filename) # remove nonwoders from filename
return f'{filename}{ext}' # join filename & ext'
def pandoc(pwd, content, format_in, format_out): def pandoc(pwd, content, format_in, format_out):
# print('HTML content file:', wiki_content_f.name) # print('HTML content file:', wiki_content_f.name)
@ -95,6 +101,7 @@ def clean_dir(dirfullpath):
os.remove(f) os.remove(f)
def print_colormsg(msg, level): def print_colormsg(msg, level):
color_cmd = ''
if level == 'fail': if level == 'fail':
color_cmd = Colors.FAIL color_cmd = Colors.FAIL
elif level == 'warning': elif level == 'warning':

Loading…
Cancel
Save