sander-wood commited on
Commit
58f09f8
·
verified ·
1 Parent(s): 3af9c3d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -153,6 +153,18 @@ xml2abc_dir = xml2abc_url.split('/')[-1][:-4].replace(".py", "").replace("-", "_
153
  wikifonia_url = input("Enter the Wikifonia URL: ")
154
  download_and_extract(wikifonia_url)
155
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  wikimusictext = []
157
  with open("wikimusictext.jsonl", "r", encoding="utf-8") as f:
158
  for line in f.readlines():
 
153
  wikifonia_url = input("Enter the Wikifonia URL: ")
154
  download_and_extract(wikifonia_url)
155
 
156
+ # Correct the file extensions
157
+ for root, dirs, files in os.walk("Wikifonia"):
158
+ for file in files:
159
+ filepath = os.path.join(root, file)
160
+ if filepath.endswith(".mxl"):
161
+ continue
162
+ else:
163
+ new_filepath = filepath.split(".mxl")[0] + ".mxl"
164
+ if os.path.exists(new_filepath):
165
+ os.remove(new_filepath)
166
+ os.rename(filepath, new_filepath)
167
+
168
  wikimusictext = []
169
  with open("wikimusictext.jsonl", "r", encoding="utf-8") as f:
170
  for line in f.readlines():