no message

This commit is contained in:
Matt Troutman 2024-10-02 15:48:25 -05:00
parent 98fb1aae67
commit 5bebd760a9
No known key found for this signature in database

View file

@ -263,22 +263,14 @@ def dont_use_dots_for_font_files(root_path=font_location):
for root, dirs, files in os.walk(root_path): for root, dirs, files in os.walk(root_path):
for file in files: for file in files:
file_path = os.path.join(root, file) file_path = os.path.join(root, file)
if file_path.endswith('.otf') or file_path.endswith('.ttf') or file_path.endswith('.ttc'): if file_path.endswith('.otf') or file_path.endswith('.ttf') or file_path.endswith('.ttc') or file_path.endswith('.pdf'):
new_file_path = None new_file_path = None
for x in ['.', ' ', '-', '.-','--']:
if file_path.startswith('.'): if file_path.startswith(x):
new_file_path = file_path.lstrip('.') new_file_path = file_path.lstrip(x)
os.rename(file_path, new_file_path)
if file_path.startswith('_'): print(f"Renamed file: {file_path} -> {new_file_path}")
new_file_path = file_path.lstrip('_') new_file_path = None
if file_path.startswith('.-'):
new_file_path = file_path.lstrip('.-')
if new_file_path != None:
os.rename(file_path, new_file_path)
print(f"Renamed file: {file_path} -> {new_file_path}")
if __name__ == '__main__': if __name__ == '__main__':
remove_ds_store_files() remove_ds_store_files()