script maintenance

This commit is contained in:
Matt Troutman 2024-10-03 00:38:34 -05:00
parent d6aa9cf4c8
commit 339cd33dd6
No known key found for this signature in database
3 changed files with 7 additions and 3 deletions

View file

@ -228,6 +228,8 @@ def remove_spaces_in_dir_names(root_path=font_location):
if ' ' in dir:
new_dir = dir.replace(' ', '-')
#lowercase the new directory name
while new_dir.endswith('-'):
new_dir = new_dir[:-1]
new_dir = new_dir.lower()
new_dir_path = os.path.join(root, new_dir)
os.rename(dir_path, new_dir_path)