-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update liberbatch.py #9
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,19 +1,15 @@ | ||||||
import os, meichecker, liberupdatev5 | ||||||
PATH = "your path here" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want the user to go in and change the path, that should be documented. I think a command line argument would be generally preferable. |
||||||
|
||||||
directory = os.fsencode("C:\\Users\\cole_\\Downloads\\liberUsualis - Copy\\liber") | ||||||
directory = os.fsencode(PATH) | ||||||
err="" | ||||||
|
||||||
i = 0 #for debugging | ||||||
for mefile in os.listdir(directory): | ||||||
filename = os.fsdecode(mefile) | ||||||
if filename.endswith("corr.mei"): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a requirement (that the files end with |
||||||
liberupdate.main(filename) | ||||||
liberupdatev5.main(filename) | ||||||
print(filename +" has been updated") | ||||||
err= err+ (meichecker.main(filename[:-4]+"NEW2.mei")+"\n") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For something like this, a linter will generally prefer an f-string.
Suggested change
|
||||||
# print(err) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this? |
||||||
print(filename +" has been checked") | ||||||
# i+=1 | ||||||
|
||||||
#if i>=100: | ||||||
# break | ||||||
print(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you using a code linter? This is not PEP8 compliant (https://peps.python.org/pep-0008/#imports)