9 lilypath = os.environ['LILYPOND_SOURCEDIR'] + '/'
11 print 'Please set LILYPOND_SOURCEDIR to the toplevel source, eg LILYPOND_SOURCEDIR=/home/foobar/lilypond-1.2.3/'
14 lilypath = lilypath + '/bin/'
15 sys.path.append(lilypath)
17 from lilypython import *
20 mailaddress = "unknown"
25 __main__.lilyversion = version_tuple_to_str(lilydirs.version_tuple())
26 os.environ["CONFIGSUFFIX"] = 'www';
27 __main__.mailaddress= os.environ['MAILADDRESS']
28 pw = pwd.getpwuid (os.getuid());
30 __main__.fullname= pw[4];
33 backstr = '\n<hr>Please take me <a href=%s>back to the index</a>\n\
34 of LilyPond -- The GNU Project Music typesetter\n\
36 This page was built using from lilypond-%s by <p>\n\
37 <address><br>%s <a href=mailto:%s><<!bla>%s</a>></address>\n\
43 (options, files) = getopt.getopt(sys.argv[1:], '', ['news='])
52 return backstr % (index, lilyversion, fullname, mailaddress, mailaddress)
54 index_file='../../out-www/index.html'
55 banner = footstr (index_file)
56 banner_id = '<! banner_id >'
60 news = gulp_file (news_file)
61 i = regex.search ('^\*\*', news)
68 s = regsub.sub ('top_of_NEWS', '<XMP>\n'+ news + '\n</XMP>\n', s)
70 if regex.search (banner_id, s) == -1:
71 s = regsub.sub ('</body>', '</BODY>', s)
72 s = regsub.sub ('</BODY>', banner_id + banner + '</BODY>', s)