Skip to content

Commit

Permalink
feat(resultsAppSetup): renamed all .stories.jsx files to .oldStories.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisraymond-uchicago committed Feb 19, 2025
1 parent a903ca7 commit 2d61883
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/lib/AnalysisApps/GWASResults/process_storybooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os
import fnmatch

def change_file_extensions(root_dir):
# Walk through all directories and files in the specified root directory
for dirpath, dirnames, filenames in os.walk(root_dir):
for filename in fnmatch.filter(filenames, '*.stories.jsx'):
# Construct the full file path
old_file_path = os.path.join(dirpath, filename)
# Create the new file name by replacing the extension
new_file_name = filename.replace('.stories.jsx', '.oldStories.tsx')
new_file_path = os.path.join(dirpath, new_file_name)
# Rename the file
os.rename(old_file_path, new_file_path)
print(f'Renamed: {old_file_path} to {new_file_path}')

if __name__ == "__main__":
# Specify the root directory you want to start from
root_directory = './' # Change this to your target directory
change_file_extensions(root_directory)

0 comments on commit 2d61883

Please sign in to comment.