From d171211074526c78e9464aa1e6a7821d9c95360e Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Thu, 27 Oct 2016 15:07:45 +0200 Subject: [PATCH] Can ignore lilydrum and -pipe files by setting --drumfile '' --- makedrum | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/makedrum b/makedrum index f03fbe8..a7ea1cb 100755 --- a/makedrum +++ b/makedrum @@ -185,32 +185,30 @@ class MakeDrum: lily_includes = '' include_drum_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 if self.args.lilydrum: for ext in ['full', 'side', 'tenor', 'bass', 'drum', 'snare']: if ext in file: include_drum_file = True break - else: - print('no lilydrum file') + if self.args.lilypipe: for ext in ['full', 'pipes']: if ext in file: include_pipe_file = True break - else: - print('no lilypipe file') if include_drum_file: - for f in self.args.lilydrum: - print(f) - self.args.includes.insert(0, f) + self.args.includes.insert(0, self.args.lilydrum) if include_pipe_file: - for f in self.args.lilypipe: - print(f) - self.args.includes.insert(0, f) + self.args.includes.insert(0, self.args.lilypipe) # 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')