]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/mutopia-index.py
* lily/include/my-lily-parser.hh: rename My_lily -> Lily
[lilypond.git] / buildscripts / mutopia-index.py
index 130a6814ada0ec6c6d068811677b6813d04e29b7..f64898fbb5c6f76f04812a6a451dfaeff872e6c5 100644 (file)
@@ -52,17 +52,19 @@ def file_exist_b (fn):
 
 
 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>The PostScript files were generated using TeX and dvips at 600 dpi.
+<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 pictures are 90 dpi anti-aliased snapshots of the printed output.
-The images are in PNG format, and should be viewable with any current
-browser.
+If you want a better impression of the appearance, do print out one of
+the PDF or PostScript files; they use scalable fonts, and should look
+good at any resolution.
 
-<p>If you want a better impression of the appearance, do print out one of
-the postscript files.
 """
 
 headertext_nopics= r"""
@@ -86,7 +88,7 @@ def read_lilypond_header (fn):
                        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:
@@ -121,7 +123,11 @@ def gen_list(inputs, filename):
                list = open(filename, 'w')
        else:
                list = sys.stdout
-       list.write ('<html><title>Rendered Examples</title>\n')
+       list.write ('<html><head><title>Rendered Examples</title>\n')
+       list.write ('<style type="text/css">\n')
+       list.write ('hr { border:0; height:1; color: #000000; background-color: #000000; }\n')
+       list.write ('</style></head>\n')
+
        list.write ('<body bgcolor=white>\n')
        
        if inputs:
@@ -135,9 +141,7 @@ def gen_list(inputs, filename):
                (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]
@@ -178,7 +182,6 @@ def gen_list(inputs, filename):
                                break
                        list_item(f, 'See a picture of page %d' % pageno, 'png')
                list_item(base + '.pdf', 'Print', 'PDF')
-               list_item(base + '.ps.gz', 'Print', 'gzipped PostScript')
                list_item(base + '.midi', 'Listen', 'MIDI')
                list.write ("</ul>\n");
 
@@ -212,7 +215,5 @@ allfiles = []
 for d in dirs:
        allfiles = allfiles + find ('*.ly.txt', d)
 
-print allfiles
-
 gen_list (allfiles, outfile)