* Add @nodes, plit at sections?
* Less kludged first introduction file
- * include *.texi files for text at start of section?
'''
Options:
-h, --help print this help
- -o, --output=NAME write tely doc to NAME
+ -n, --name=NAME write tely doc to NAME
-t, --title=TITLE set tely doc title TITLE
+ -i, --introduction=FILE use FILE as intruduction at the top
+ -f, --footer=FILE use FILE as footer on the bottom of the page
""")
sys.exit (0)
-(options, files) = getopt.getopt(sys.argv[1:], 'hn:t:', [
- 'help', 'name=', 'title='])
+(options, files) = getopt.getopt(sys.argv[1:], 'hn:t:i:f:', [
+ 'help', 'name=', 'title=', 'introduction=', 'footer='])
name="ly-doc"
title="Ly Doc"
+header = None
+footer = None
for opt in options:
o = opt[0]
a = opt[1]
name = a
elif o == '-t' or o == '--title':
title = a
+ elif o == '-i' or o == '--introduction':
+ header = a
+ elif o == '-f' or o == '--footer':
+ footer = a
else:
raise 'unknown opt ', o
@node Top, , , (dir)
''' % (name, title, title)
+ if header:
+ header_text = open (header).read ()
+ s += header_text
+
+
def name2line (n):
# UGR
s = r"""
return s
files.sort ()
s = s + string.join (map (lambda x: name2line (x), files), "\n")
- s = s + '\n@bye\n'
+ s += '\n'
+ if footer:
+ footer_text = open (footer).read ()
+ s += footer_text
+ s += '\n'
+ s = s + '@bye\n'
f = "%s/%s.tely" % (dir, name)
sys.stderr.write ("%s: writing %s..." % (program_name, f))
h = open (f, "w")
--- /dev/null
+@unnumbered Introduction
+
+This document presents proofs for LilyPond @lilypondversion. When the
+text corresponds with the shown notation, we consider LilyPond Officially
+BugFree (tm). This document is intended for finding bugs and for
+documenting bugfixes.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+
+TODO: order of tests (file names!), test only one feature per test.
+Smaller and neater tests.
+
+++ /dev/null
-\version "2.10.0"
-%% +.ly: Be the first .ly file for lys-to-tely.py.
-%% Better to make lys-to-tely.py include "introduction.texi" or
-%% other .texi documents too?
-
-
-\header{
-texidoc =
-
-#(string-append "@unnumbered Introduction
-
-This document presents proofs for
-LilyPond " (lilypond-version) ". When the
-text corresponds with the shown notation, we consider LilyPond Officially
-BugFree (tm). This document is intended for finding bugs and for
-documenting bugfixes.
-
-In the web version of this document, you can click on the file name
-or figure for each example to see the corresponding input file.
-
-TODO: order of tests (file names!), test only one feature per test.
-Smaller and neater tests.
-")
-
-}
-
-%
-% make sure the .png is generated.
-%
-\lyrics { "(left blank intentionally)" }
-
include $(depth)/make/stepmake.make
TITLE=LilyPond Regression Tests
+HEADER_FILE=AAA-intro-regression-texi
+FOOTER_FILE=
SUBDIRS=musicxml
LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc musicxml
include $(depth)/make/stepmake.make
-TITLE=Lilypon musicxml2ly Regression Tests
-
+TITLE=Lilypond musicxml2ly Regression Tests
+HEADER_FILE=intro-texi
+FOOTER_FILE=
--- /dev/null
+@unnumbered MusicXML regression and coverage test
+
+This document presents proofs for the musicxml2ly script provided with
+LilyPond @lilypondversion. The files don't have a description yet, so
+there is no official indication when the output is wrong.
+These snippets are provided as unit test files in MusicXML, converted to
+a .ly file by musicxml2ly and then processed by lilypond as usual.
+
+If something does not seem wright in the output, it might either be that this
+feature has not been implemented, has been wrongly implemented, or a regression
+has crept in recently...
+This document is intended for finding bugs and for documenting bugfixes.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding .ly intermediary file.
+
+TODO: Find a way to add a description to the .ly files for texinfo.
+
ABC2LY = $(script-dir)/abc2ly.py
MUSICXML2LY = $(script-dir)/musicxml2ly.py
CONVERT_LY = $(script-dir)/convert-ly.py
-LILYPOND_BOOK = $(script-dir)/lilypond-book.py
+LILYPOND_BOOK = $(script-dir)/out/lilypond-book
## ugh : fix me, input/new/pitch
LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/manual/ -I $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/ -I $(top-build-dir)/mf/out/ -I $(input-dir)/new/pitch
$(outdir)/collated-files.tely: $(LY_FILES) $(OUT_LY_FILES)
- $(PYTHON) $(buildscript-dir)/lys-to-tely.py --name=$(outdir)/collated-files --title="$(TITLE)" $^
+ $(PYTHON) $(buildscript-dir)/lys-to-tely.py --name=$(outdir)/collated-files --introduction="$(HEADER_FILE)" --footer="$(FOOTER_FILE)" --title="$(TITLE)" $^
(?P<match>
<(?P<inline>(inline)?)mediaobject>\s*<imageobject.*?>\s*<imagedata\s+fileref="(?P<filename>.*?\.ly)"\s*(role="(?P<options>.*?)")?\s*(/>|>\s*</imagedata>)\s*</imageobject>\s*</(inline)?mediaobject>)''',
+ 'lilypond_version':
+ no_match,
+
'multiline_comment':
r'''(?smx)
(?P<match>
'verbatim':
no_match,
-
},
##
HTML: {
\s*(?P<filename>.*?)\s*
</lilypondfile>)''',
+ 'lilypond_version':
+ r'''(?mx)(?P<match><lilypond-version>)''',
+
'multiline_comment':
r'''(?smx)
(?P<match>
(?P<filename>\S+?)
})''',
+ 'lilypond_version':
+ r'''(?P<match>\\lilypond_version)''',
+
'multiline_comment':
no_match,
(?P<filename>\S+)
})''',
+ 'lilypond_version':
+ r'''(?mx)(?P<match>@lilypondversion)''',
+
'multiline_comment':
r'''(?smx)
^(?P<match>
return ('\\sourcefilename \"%s\"\n\\sourcefileline 0\n%s'
% (name, contents))
+class Version_snippet (Snippet):
+ def replacement_text (self):
+ return (program_version)
+
snippet_type_to_class = {
'lilypond_file': Lilypond_file_snippet,
'lilypond_block': Lilypond_snippet,
+ 'lilypond_version': Version_snippet,
'lilypond': Lilypond_snippet,
'include': Include_snippet,
}
# 'verb',
'singleline_comment',
'lilypond_file',
+ 'lilypond_version',
'include',
'lilypond',
)