From ac1286b84525b37124a7df84a0ff5cd5435637e5 Mon Sep 17 00:00:00 2001 From: hanwen Date: Fri, 19 Sep 2003 12:32:30 +0000 Subject: [PATCH] (escape_path): escape spaces in directory names --- ChangeLog | 2 ++ Documentation/topdocs/NEWS.texi | 3 +++ ly/engraver-init.ly | 1 + scripts/lilypond.py | 14 ++++++++++---- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4e72dd795..c960de8317 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2003-09-19 Han-Wen Nienhuys + * scripts/lilypond.py (escape_path): escape spaces in directory names + * input/test/text-spanner.ly: fixes. 2003-09-19 Heikki Junes diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 0ef4be1e43..032002b932 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -9,6 +9,9 @@ @itemize +@item +Crescendos can now be drawn dotted or stippled. + @item Quarter tones are now supported. They are entered by suffixing @code{ih} for a half-sharp and @code{eh} for a half-flat. Hence, the diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 60c0507acd..746213a6c7 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -40,6 +40,7 @@ StaffContext=\translator { \consists "Instrument_name_engraver" \consists "Grob_pq_engraver" \consists "Forbid_line_break_engraver" + \consists "String_number_engraver" \consistsend "Axis_group_engraver" minimumVerticalExtent = #'(-6 . 6) diff --git a/scripts/lilypond.py b/scripts/lilypond.py index b53a812cc5..efea9e02d1 100644 --- a/scripts/lilypond.py +++ b/scripts/lilypond.py @@ -233,11 +233,15 @@ def set_setting (dict, key, val): dict[key] = [val] +def escape_path (x): + return re.sub ('([ \n\t\\\\])', r'\\\1',x) + def run_lilypond (files, dep_prefix): + def make_include_option (x): + return '-I %s' % escape_path (x) opts = '' - opts = opts + ' ' + string.join (map (lambda x : '-I ' + x, - include_path)) + opts = opts + ' ' + string.join (map (make_include_option, include_path)) if pseudo_filter_p: opts = opts + ' --output=lelie' if paper_p: @@ -254,7 +258,7 @@ def run_lilypond (files, dep_prefix): if dep_prefix: opts = opts + ' --dep-prefix=%s' % dep_prefix - fs = string.join (files) + fs = string.join (map (escape_path, files)) global verbose_p if verbose_p: @@ -806,7 +810,9 @@ if 1: outbase = ly.strip_extension (outbase, i) for i in files[:] + [output_name]: - if string.find (i, ' ') >= 0: + b = os.path.basename (i) + print b + if string.find (b, ' ') >= 0: ly.error (_ ("filename should not contain spaces: `%s'") % i) ly.exit (1) -- 2.39.5