1
0
Fork 0
mirror of https://github.com/kastdeur/pipeband-music.git synced 2025-05-17 21:39:17 +02:00

Moved lilydrum directory

small changes to headers
This commit is contained in:
Eric Teunis de Boone 2015-11-06 15:13:11 +01:00
parent 34641ea703
commit e574767762
13 changed files with 30 additions and 21 deletions

View file

@ -122,6 +122,8 @@ class MakeDrum:
header_format = "header_book"
else:
header_format = "header_default"
else:
header_format = "header_" + self.args.format
tmp_file = self.maketemplate(tmp_dir, file, header_format)
@ -198,6 +200,13 @@ class MakeDrum:
printit = 1
for line in music:
if line.startswith(u'\\include "lilydrum.ly"'): continue
if line.startswith(u'\\include'):
# Rewrite includes to absolute location of file
incline = line.replace('\\include', '').strip('"\' ')
print("include "+incline)
if not incline.startswith('\\'): #already absolute
incline = os.path.join(os.path.relpath(os.path.dirname(file)), incline)
line = "\\include \""+incline+"\""
if printit:
out_file.write(line.replace('\r', '')+'\n')
out_file.close()