1
0
Fork 0
mirror of https://github.com/kastdeur/pipeband-music.git synced 2025-05-15 12:29:22 +02:00

Added quite a few sets

Small update to make_set script
This commit is contained in:
Eric Teunis de Boone 2016-03-15 16:33:09 +01:00
parent 2bafd74202
commit d8ef790ade
3 changed files with 62 additions and 17 deletions

View file

@ -1,8 +1,7 @@
#!/bin/python3
## Script to easily generate a set (concatenated scores)
import codecs, os
import codecs, os, sys
from argparse import ArgumentParser
parser = ArgumentParser(__file__)
@ -12,6 +11,10 @@ parser.add_argument('scores',nargs='+')
args = parser.parse_args()
if os.path.isdir(args.setfile):
print("First argument cannot be a directory ")
sys.exit()
os.makedirs(os.path.dirname(args.setfile), exist_ok=True)
fpoint = codecs.open(args.setfile, 'w+', 'utf8')
fpoint.write(u'\ufeff')
@ -40,6 +43,3 @@ for f in args.scores:
fpoint.write('\\include \"' + os.path.join( os.path.abspath( os.curdir ) ,f) + '\"\n')
fpoint.close()