headertext= r"""
-<p>You're looking at a page with some LilyPond samples.
-These files are also included in the distribution. The output is
-completely generated by LilyPond, without any touch up by humans.
+
+<p>You're looking at a page with some LilyPond samples. These files
+are also included in the distribution. The output is completely
+generated from the <tt>.ly</tt> source file, without any further touch
+up.
<p>The PostScript files were generated using TeX and dvips at 600 dpi.
The pictures are 90 dpi anti-aliased snapshots of the printed output.
return dict
while s:
- m = re.search (r"""\s*(\S+)\s*=\s*([^;]+)\s*;""", s)
+ m = re.search (r'''\s*(\S+)\s*=\s*"([^"]+)"''', s)
if m == None:
s = ''
else:
return dict
def help ():
- sys.stdout.write (r"""Usage: mutopia-index [options] INFILE OUTFILE
-Generate index for mutopia\n
+ sys.stdout.write (r"""Usage: mutopia-index [OPTIONS] INFILE OUTFILE
+Generate index for mutopia.
+
Options:
-h, --help print this help
- -o,-output=FILE write output to file.
+ -o, --output=FILE write output to file
-s, --subdirs=DIR add subdir
- --suffix=SUF specify suffix"""
+ --suffix=SUF specify suffix
+
+"""
)
sys.exit (0)
(base, ext2) = os.path.splitext (base)
ext = ext2 + ext
- print '%s, ' % ex
header = read_lilypond_header(ex)
-
def read_dict(s, default, h =header):
try:
ret = h[s]
desc = read_dict('description', '')
list.write('<hr>\n')
list.write('<h1>%s</h1>\n' % head);
- if composer <> '':
+ if composer:
list.write('<h2>%s</h2>\n' % composer)
- if desc <> '':
+ if desc:
list.write('%s<p>' % desc)
list.write ('<ul>\n')
def list_item(filename, desc, type, l = list):
for d in dirs:
allfiles = allfiles + find ('*.ly.txt', d)
-print allfiles
-
gen_list (allfiles, outfile)