]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/bin/add-html-footer.py
`bug'fix: a colon `:' is added (only) after a sentence which is complete;
[lilypond.git] / stepmake / bin / add-html-footer.py
index 54e313b9f239cfd575f266a09be8993d8a45c93e..18b691719b72388489aadf8abc539851299a5a82 100644 (file)
@@ -40,10 +40,10 @@ of @PACKAGE_NAME@
 
 built = r"""<hr>
 <p><font size="-1">
-This page was built from @PACKAGE_NAME@-@PACKAGE_VERSION@ (@BRANCH@) by<br>
+This page is for @PACKAGE_NAME@-@PACKAGE_VERSION@ (@BRANCH@). <br>
 </font>
-<address><font size="-1">@GCOS@ &lt;<a href="mailto:@MAILADDRESS@">@MAILADDRESS@</a>&gt;,
-@LOCALTIME@.</font></address>"""
+<address><font size="-1">
+Report errors to &lt;<a href="mailto:@MAILADDRESS@">@MAILADDRESS@</a>&gt;.</font></address>"""
 
 
 def gulp_file (f):
@@ -62,7 +62,7 @@ def gulp_file (f):
        return s
 
 def help ():
-       sys.stdout.write (r"""Usage: add-html-footer [OPTION]... HTML-FILE
+       sys.stdout.write (r"""Usage: add-html-footer [OPTIONS]... HTML-FILE
 Add header, footer and top of ChangLog file (up to the ********) to HTML-FILE
 
 Options:
@@ -73,6 +73,7 @@ Options:
   --index=URL               set homepage to URL
   --name=NAME               set package_name to NAME
   --version=VERSION         set package version to VERSION
+
 """)
        sys.exit (0)
 
@@ -110,7 +111,7 @@ def set_gcos ():
                pw = ntpwd.getpwname(os.environ['USERNAME'])
        else:
                import pwd
-               if os.environ.has_key('FAKEROOTKEY'):
+               if os.environ.has_key('FAKEROOTKEY') and os.environ.has_key('LOGNAME'):
                        pw = pwd.getpwnam (os.environ['LOGNAME'])
                else:
                        pw = pwd.getpwuid (os.getuid())
@@ -133,7 +134,9 @@ if os.path.basename (index_url) != "index.html":
 top_url = os.path.dirname (index_url) + "/"
 
 header = compose (default_header, header_file)
-footer = compose (default_footer, footer_file) + built
+
+# compose (default_footer, footer_file)
+footer =  built
 header_tag = '<!-- header_tag -->'
 footer_tag = '<!-- footer_tag -->'
 
@@ -235,7 +238,7 @@ def do_file (f):
 
 
        versiontup = string.split(package_version, '.')
-       branch_str = 'stable-branch' 
+       branch_str = 'stable-branch'
        if string.atoi ( versiontup[1]) %  2:
                branch_str = 'development-branch'
                
@@ -250,8 +253,8 @@ def do_file (f):
        s = re.sub ('@BRANCH@', branch_str, s)  
 
        # ugh, python2.[12] re is broken.
-       #pat = re.compile ('.*?<!--\s*(@[^@]*@)\s*=\s*([^\s]*)\s*-->', re.DOTALL)
-       pat = re.compile ('[.\n]*?<!--\s*(@[^@]*@)\s*=\s*([^\s]*)\s*-->')
+       #pat = re.compile ('.*?<!--\s*(@[^@]*@)\s*=\s*([^>]*)\s*-->', re.DOTALL)
+       pat = re.compile ('[.\n]*?<!--\s*(@[^@]*@)\s*=\s*([^>]*)\s*-->')
        m = pat.search (s)
        while m:
                at_var = m.group (1)