]> git.donarmstrong.com Git - lilypond.git/blobdiff - bin/make-website.py
patch::: 0.1.48: Re: lily 0.1.59
[lilypond.git] / bin / make-website.py
index d7ee588e5a27ec43ddf5d9b2d39ffd8a29b478ec..a2243a78f913e0e884e98bfa06cdcf80e1f8c7ca 100644 (file)
  stupid script to generate WWW site.  
 
  The WWW site is my test-suite for LilyPond, I usually don't
- distribute versions that fail to complete this script """
+ distribute versions that fail to complete this script 
+
+You should set the following environment vars:
+
+LILYPOND_SOURCEDIR
+TEXINPUTS
+MAILADDRESS
+
+
+ """
 
 import sys
 import os
@@ -19,8 +28,10 @@ import os
 lilypath =''
 try:
     lilypath = os.environ['LILYPOND_SOURCEDIR'] + '/'
-except IndexError:
-    lilypath = os.environ['HOME'] + 'musix/current'
+except KeyError:
+    print 'Please set LILYPOND_SOURCEDIR to the toplevel source, eg LILYPOND_SOURCEDIR=/home/foobar/lilypond-1.2.3/'
+    sys.exit(1)
+
 lilypath = lilypath + '/bin/'
 sys.path.append(lilypath)
  
@@ -84,7 +95,7 @@ def my_system(cmds):
 base="lilypond/";
 
 examples=["twinkle-pop", 
-         "toccata-fuga-E", 
+         "praeludium-fuga-E", 
          "cadenza", 
          "twinkle", 
          "collisions",
@@ -112,8 +123,11 @@ def gen_examples(inputs):
     print 'generating examples:\n'
     outputs = []
     for i in inputs:
-       located = multiple_find ([i + '.ly'], include_path) [0]
-
+       try:
+               located = multiple_find ([i + '.ly'], include_path) [0]
+       except IndexError:
+               print 'continuing dazed & confused (%s) ' % i
+               continue
        outputs.append (located)
        if not file_exist_b(i + '.dvi'):
            my_system (['ly2dvi %s' % located])
@@ -264,6 +278,7 @@ def edit_html():
        s = regsub.sub ('</BODY>', footstr('index.html') + makewebsite_id + '</BODY>', s)
        s = regsub.sub('<TITLE>\(.*\)</TITLE>$', 
                       '<TITLE>LilyPond WWW: \\1</TITLE>', s)
+
        dump_file (f,s)