2004-02-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scripts/hw-lilypond-book.py (Snippet.output_print_filename):
+
+ * scm/define-translator-properties.scm (drumPitchTable): add
+ property.
+
* scripts/lilypond-book.py (simple_toplevel_snippets): new
function.
(help_summary): docstrings.
-
-2004-02-05 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
- * scripts/lilypond-book.py (outname): fix typo
+ (do_file): strip the dir of input_base too.
2004-02-05 Jan Nieuwenhuizen <janneke@gnu.org>
STEPMAKE_TEMPLATES=documentation texinfo tex
LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
-LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
+LILYPOND_BOOK_FLAGS = --process="lilypond-bin -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
include $(depth)/make/stepmake.make
STEPMAKE_TEMPLATES=documentation texinfo tex
LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
-LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
+LILYPOND_BOOK_FLAGS = --process="lilypond-bin -I $(srcdir)/input/regression -e '(ly:set-option (quote internal-type-checking) \#t)'"
## Hmm, would this work? No -- if we really want examples, move
## to other dir (input/) comes to mind.
ABC2LY = $(script-dir)/abc2ly.py
CONVERT_LY = $(script-dir)/convert-ly.py
LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond
-LILYPOND_BOOK = $(script-dir)/lilypond-book.py
+LILYPOND_BOOK = $(script-dir)/hw-lilypond-book.py
LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/ -I $(builddir)/mf/out/
#texi-html for www only:
# it is not, for --srcdir builds
$(outdir)/%.texi: %.tely
if [ -f $@ ]; then chmod a+w $@; fi
- set|egrep '(TEX|LILY)' # ugh, what's this?
$(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) $<
chmod -w $@
(translator-property-description 'crescendoText markup? "Text to print at start of non-hairpin crecscendo, ie: @samp{cresc.}")
(translator-property-description 'crescendoSpanner symbol? "Type of spanner to be used for crescendi. One of: @samp{hairpin}, @samp{line}, @samp{dashed-line}, @samp{dotted-line}. If unset, hairpin type is used.")
(translator-property-description 'decrescendoText markup? "Text to print at start of non-hairpin decrecscendo, ie: @samp{dim.}")
+(translator-property-description 'drumPitchTable hash-table?
+ "A table mapping percussion
+instruments (symbols) to pitches.")
+
(translator-property-description 'drumStyleTable hash-table?
"A hash table containing mapping drums to layout settings.
Predefined values: @code{drums-style}, @code{timbales-style}, @code{congas-style}, @code{bongos-style}
index = 0
class Snippet:
-
## huh? index is redundant? --hwn
def __init__ (self, type, source, index, match):
self.type = type
'''
#need anything else besides textwidth?
def get_latex_textwidth (source):
- m = re.search (r'''(?P<preabmle>\\begin\s*{document})''', source)
+ m = re.search (r'''(?P<preamble>\\begin\s*{document})''', source)
preamble = source[:m.start (0)]
latex_document = LATEX_DOCUMENT % vars ()
parameter_string = filter_pipe (latex_document, latex_filter_cmd)
input_base = 'stdin'
else:
input_base = os.path.splitext (input_filename)[0]
+ input_base = os.path.basename (input_base)
+
output_filename = output_name + '/' + input_base \
+ format2ext[format]
h = open (output_filename, 'w')