main.py
: Use more reliable method of fetching filename
The old method failed for files with no file extension.
This commit is contained in:
parent
b2353df58b
commit
77aa9598a0
@ -1,4 +1,5 @@
|
||||
import argparse
|
||||
import os
|
||||
|
||||
from tja2fumen.parsers import readFumen, parseTJA
|
||||
from tja2fumen.writers import writeFumen
|
||||
@ -56,6 +57,6 @@ if __name__ == "__main__":
|
||||
fumen, convertedTJAs = main(fnameTJA=fnameTJA)
|
||||
|
||||
for course, song in convertedTJAs.items():
|
||||
outputName = ".".join(fnameTJA.split('.')[0:-1]) + f"_{COURSE_IDS[course]}.bin"
|
||||
outputName = os.path.splitext(fnameTJA)[0] + f"_{COURSE_IDS[course]}.bin"
|
||||
outputFile = open(outputName, "wb")
|
||||
writeFumen(outputFile, song)
|
||||
|
Loading…
Reference in New Issue
Block a user