diff --git a/.fontfoldercleanup/cleanup.py b/.fontfoldercleanup/cleanup.py index 7f57b3a..d89b338 100644 --- a/.fontfoldercleanup/cleanup.py +++ b/.fontfoldercleanup/cleanup.py @@ -6,6 +6,7 @@ font_location = '/Users/fishy/custom_fonts/font_files' bad_phrases = [' Free', '-medium', + '-Medium', '_3', ' by jeremy vessey', ' teenage foundry', @@ -241,6 +242,16 @@ def prepend_folder_name_to_font_dash(root_path=font_location): os.rename(dir_path, new_dir_path) print(f"Renamed directory: {dir_path} -> {new_dir_path}") +def lowercase_file_names(root_path=font_location): + for root, dirs, files in os.walk(root_path): + for file in files: + file_path = os.path.join(root, file) + new_file_path = os.path.join(root, file.lower()) + #let's also remove spaces in the file names + new_file_path = new_file_path.replace(' ', '-') + os.rename(file_path, new_file_path) + print(f"Renamed file: {file_path} -> {new_file_path}") + if __name__ == '__main__': remove_ds_store_files() remove_empty_folders() diff --git a/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py b/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py index 3128181..5c09007 100644 --- a/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py +++ b/.fontfoldercleanup/remove_ds_and_clean_empty_folders.py @@ -1,6 +1,10 @@ import cleanup if __name__ == '__main__': + ## Clean up git repository + #Reset and remove untracked files + os.system("git reset --hard") + os.system("git clean -fdx") cleanup.remove_ds_store_files() cleanup.remove_setup_complete_files() - cleanup.remove_empty_folders() + cleanup.remove_empty_folders() \ No newline at end of file