4 Print a nice footer. add the top of the NEWS file (up to the ********)
15 lilypath
= os
.environ
['LILYPOND_SOURCEDIR'] + '/'
17 print 'Please set LILYPOND_SOURCEDIR to the toplevel source, eg LILYPOND_SOURCEDIR=/home/foobar/lilypond-1.2.3/'
20 lilypath
= lilypath
+ '/bin/'
21 sys
.path
.append(lilypath
)
23 from lilypython
import *
30 __main__
.lilyversion
= version_tuple_to_str(lilydirs
.version_tuple())
31 os
.environ
["CONFIGSUFFIX"] = 'www';
32 pw
= pwd
.getpwuid (os
.getuid());
34 __main__
.fullname
= pw
[4];
37 backstr
= '\n<hr>Please take me <a href=%s>back to the index</a>\n\
38 of LilyPond -- The GNU Project Music typesetter\n\
40 This page was built from lilypond-%s by <p>\n\
41 <address><br>%s <a href=mailto:%s><<!bla>%s</a>></address>\n\
48 (options
, files
) = getopt
.getopt(sys
.argv
[1:], '', ['news='])
57 return backstr
% (index
, lilyversion
, fullname
, mailaddress (), mailaddress
)
59 index_file
='../../out-www/index.html'
60 banner
= footstr (index_file
)
61 banner_id
= '<! banner_id >'
65 news
= gulp_file (news_file
)
66 i
= regex
.search ('^\*\*', news
)
73 s
= regsub
.sub ('top_of_NEWS', '<XMP>\n'+ news
+ '\n</XMP>\n', s
)
75 if regex
.search (banner_id
, s
) == -1:
76 s
= regsub
.sub ('</body>', '</BODY>', s
)
77 s
= regsub
.sub ('</BODY>', banner_id
+ banner
+ '</BODY>', s
)