mirror of
https://github.com/kastdeur/lilydrum.git
synced 2024-12-22 17:23:32 +01:00
Can ignore lilydrum and -pipe files by setting --drumfile ''
This commit is contained in:
parent
176d189edf
commit
d171211074
1 changed files with 8 additions and 10 deletions
18
makedrum
18
makedrum
|
@ -186,31 +186,29 @@ class MakeDrum:
|
||||||
include_drum_file = False
|
include_drum_file = False
|
||||||
include_pipe_file = False
|
include_pipe_file = False
|
||||||
|
|
||||||
|
if not self.args.lilydrum or self.args.lilydrum == "''":
|
||||||
|
self.args.lilydrum = False
|
||||||
|
|
||||||
|
if not self.args.lilypipe or self.args.lilypipe == "''":
|
||||||
|
self.args.lilypipe = False
|
||||||
# find out whether drum, pipes, or full score
|
# find out whether drum, pipes, or full score
|
||||||
if self.args.lilydrum:
|
if self.args.lilydrum:
|
||||||
for ext in ['full', 'side', 'tenor', 'bass', 'drum', 'snare']:
|
for ext in ['full', 'side', 'tenor', 'bass', 'drum', 'snare']:
|
||||||
if ext in file:
|
if ext in file:
|
||||||
include_drum_file = True
|
include_drum_file = True
|
||||||
break
|
break
|
||||||
else:
|
|
||||||
print('no lilydrum file')
|
|
||||||
if self.args.lilypipe:
|
if self.args.lilypipe:
|
||||||
for ext in ['full', 'pipes']:
|
for ext in ['full', 'pipes']:
|
||||||
if ext in file:
|
if ext in file:
|
||||||
include_pipe_file = True
|
include_pipe_file = True
|
||||||
break
|
break
|
||||||
else:
|
|
||||||
print('no lilypipe file')
|
|
||||||
|
|
||||||
if include_drum_file:
|
if include_drum_file:
|
||||||
for f in self.args.lilydrum:
|
self.args.includes.insert(0, self.args.lilydrum)
|
||||||
print(f)
|
|
||||||
self.args.includes.insert(0, f)
|
|
||||||
|
|
||||||
if include_pipe_file:
|
if include_pipe_file:
|
||||||
for f in self.args.lilypipe:
|
self.args.includes.insert(0, self.args.lilypipe)
|
||||||
print(f)
|
|
||||||
self.args.includes.insert(0, f)
|
|
||||||
|
|
||||||
# set up a tmp file with template and file combined
|
# set up a tmp file with template and file combined
|
||||||
tmp_file = os.path.join(tmp_dir, self.TMP_PREFIX + os.path.relpath(file).replace('../','').replace('music/','',1).replace('/', '-')[:-3] + self.args.suffix + '.ly')
|
tmp_file = os.path.join(tmp_dir, self.TMP_PREFIX + os.path.relpath(file).replace('../','').replace('music/','',1).replace('/', '-')[:-3] + self.args.suffix + '.ly')
|
||||||
|
|
Loading…
Reference in a new issue