Add autogenerated markers to files produced from build scripts.
Also fix some typos and help message from scripts.
import time
import operator
import time
import operator
footer = '''
<div class="footer">
footer = '''
<div class="footer">
+<!-- This footer was autogenerated by %s -->
<p class="footer_version">
<p class="footer_version">
+%%(footer_name_version)s
</p>
<p class="footer_report">
</p>
<p class="footer_report">
+%%(footer_report_links)s
web_footer = '''
<div class="footer">
web_footer = '''
<div class="footer">
+<!-- This footer was autogenerated by %s -->
footer_name_version = _doc ('This page is for %(package_name)s-%(package_version)s (%(branch_str)s).')
# ugh, must not have "_doc" in strings because it is naively replaced with "_" in hacked gettext process
footer_name_version = _doc ('This page is for %(package_name)s-%(package_version)s (%(branch_str)s).')
# ugh, must not have "_doc" in strings because it is naively replaced with "_" in hacked gettext process
LANGUAGES_TEMPLATE = '''
<p id="languages">
LANGUAGES_TEMPLATE = '''
<p id="languages">
+<!-- These links were autogenerated by %s -->
+ %%(language_available)s
html_re = re.compile ('(.*?)(?:[.]([^/.]*))?[.]html$')
html_re = re.compile ('(.*?)(?:[.]([^/.]*))?[.]html$')
- print 'usage: %s [-s style] [-o <outfile>] [-q] BIBFILES...'
+ print 'usage: bib2texi.py [-s style] [-o <outfile>] [-q] BIBFILES...'
print '-q suppresses most output'
(options, files) = getopt.getopt (sys.argv[1:], 's:o:hq', [])
print '-q suppresses most output'
(options, files) = getopt.getopt (sys.argv[1:], 's:o:hq', [])
+marker = """@c This file was autogenerated
+@c from: %s
+@c by: %s
+
+""" % (", ".join(files), sys.argv[0])
def strip_extension (f, ext):
(p, e) = os.path.splitext (f)
def strip_extension (f, ext):
(p, e) = os.path.splitext (f)
sys.stderr.write ("Bibtex generated an empty file!")
sys.exit (1)
sys.stderr.write ("Bibtex generated an empty file!")
sys.exit (1)
-open (output, 'w').write (bbl)
+fout = open (output, 'w')
+fout.write (marker)
+fout.write (bbl)
+fout.close ()
def cleanup (tmpfile):
for a in ['aux','bbl', 'blg']:
def cleanup (tmpfile):
for a in ['aux','bbl', 'blg']:
print "@end macro"
print ""
print "@end macro"
print ""
+print "@c This file was autogenerated"
+print "@c from: VERSION"
+print "@c by: %s" % sys.argv[0]
+print ""
print "@c ************************ Version numbers ************"
print "@c ************************ Version numbers ************"
make_macro("version", VERSION)
make_macro("versionStable", VERSION_STABLE)
make_macro("versionDevel", VERSION_DEVEL)
make_macro("version", VERSION)
make_macro("versionStable", VERSION_STABLE)
make_macro("versionDevel", VERSION_DEVEL)
+print "@c *****************************************************"
#!@PYTHON@
# -*- coding: utf-8 -*-
#!@PYTHON@
# -*- coding: utf-8 -*-
-# create-version-itexi.py
+# create-weblinks-itexi.py
""" when being called on lilypond.org, pass it the location of the
top source dir on the command-line. """
""" when being called on lilypond.org, pass it the location of the
top source dir on the command-line. """
string += "}"
make_macro(name, string)
string += "}"
make_macro(name, string)
-def make_download_source(name, vstring, version, lang):
+def make_download_source(name, version, lang):
+ assert "." in version
+ vstring = "v%s.%s" % tuple(version.split(".", 2)[0:2])
string = "@uref{http://download.linuxaudio.org/lilypond/sources/"
string += vstring + "/"
string += "lilypond-" + version + ".tar.gz"
string = "@uref{http://download.linuxaudio.org/lilypond/sources/"
string += vstring + "/"
string += "lilypond-" + version + ".tar.gz"
make_ver_link(macroLang("doctarball"+name, lang),
url, getTrans("Doc tarball for ", lang)+version)
make_ver_link(macroLang("doctarball"+name, lang),
url, getTrans("Doc tarball for ", lang)+version)
+print "@c This file was autogenerated"
+print "@c from: VERSION"
+print "@c by: %s" % sys.argv[0]
+print ""
print "@c ************************ Download binaries ************"
print "@c ************************ Download binaries ************"
make_all_downloads("Stable", VERSION_STABLE)
make_all_downloads("Devel", VERSION_DEVEL)
print "@c ************************ Download source ************"
make_all_downloads("Stable", VERSION_STABLE)
make_all_downloads("Devel", VERSION_DEVEL)
print "@c ************************ Download source ************"
-# FIXME: icky hard-coding! -gp
- print "@c *********", lang, "***"
- make_download_source("downloadStableSource","v2.16",VERSION_STABLE,lang)
- make_download_source("downloadDevelSource","v2.17",VERSION_DEVEL,lang)
+ print "@c *********", lang or "en", "***"
+ make_download_source("downloadStableSource", VERSION_STABLE, lang)
+ make_download_source("downloadDevelSource", VERSION_DEVEL, lang)
print "@c ************************ Manual links ************"
print "@c ************************ Manual links ************"
- print "@c *********", lang, "***"
- make_manual_links("Stable", VERSION_STABLE,lang)
- make_manual_links("Devel", VERSION_DEVEL,lang)
+ print "@c *********", lang or "en", "***"
+ make_manual_links("Stable", VERSION_STABLE, lang)
+ make_manual_links("Devel", VERSION_DEVEL, lang)
- make_doctarball_links("Stable", VERSION_STABLE,lang)
- make_doctarball_links("Devel", VERSION_DEVEL,lang)
+ make_doctarball_links("Stable", VERSION_STABLE, lang)
+ make_doctarball_links("Devel", VERSION_DEVEL, lang)
print "@c ************************ Regtest links ************"
print "@c ************************ Regtest links ************"
-for lang in langs:
- print "@c *********", lang, "***"
- make_regtest_links("Stable", VERSION_STABLE,lang)
- make_regtest_links("Devel", VERSION_DEVEL,lang)
-
+for lang in langs:
+ print "@c *********", lang or "en", "***"
+ make_regtest_links("Stable", VERSION_STABLE, lang)
+ make_regtest_links("Devel", VERSION_DEVEL, lang)
+print "@c ***************************************************"
input_filename = ""
glob_input = ""
template = '''\input texinfo
input_filename = ""
glob_input = ""
template = '''\input texinfo
+
+@c This file was autogenerated
+@c from: %s
+@c by: %s
+
@setfilename %%(name)s.info
@settitle %%(title)s
@setfilename %%(name)s.info
@settitle %%(title)s
+''' % (", ".join(files), sys.argv[0], include_snippets)
for opt in options:
o = opt[0]
for opt in options:
o = opt[0]
else:
# not Unix philosophy, but hey, at least we notice when
# we don't distribute any .ly files.
else:
# not Unix philosophy, but hey, at least we notice when
# we don't distribute any .ly files.
- sys.stderr.write ("No files specified. Doing nothing")
+ sys.stderr.write ("No files specified. Doing nothing. Use -h to display usage.")
summary += '<p>%d unchanged</p>' % len (unchanged)
summary += '<p>%d unchanged</p>' % len (unchanged)
html = '''<html>
<head>
<title>LilyPond regression test results</title>
html = '''<html>
<head>
<title>LilyPond regression test results</title>
+<meta name="author" content="This file was autogenerated by %(me)s">
<script language="javascript" type="text/javascript">
// <![CDATA[
var rows = document.getElementsByTagName("tr");
<script language="javascript" type="text/javascript">
// <![CDATA[
var rows = document.getElementsByTagName("tr");
#!@PYTHON@
#-*- coding: utf-8 -*-
#!@PYTHON@
#-*- coding: utf-8 -*-
-##### This is web_post.py. This script deals with translations
+##### This is website_post.py. This script deals with translations
##### in the "make website" target.
import sys
##### in the "make website" target.
import sys
dir = sys.argv[1]
os.chdir(dir)
dir = sys.argv[1]
os.chdir(dir)
def makeFooter (filename, currentLang):
footer = '''<p id="languages">
def makeFooter (filename, currentLang):
footer = '''<p id="languages">
+<!-- These links were autogenerated by %(me)s -->
%(other)s: %(lst)s.
<br>
%(browser_language)s
%(other)s: %(lst)s.
<br>
%(browser_language)s
static_files = {
os.path.join (outdir, 'index.html'):
'''<META HTTP-EQUIV="refresh" content="0;URL=Documentation/web/index.html">
static_files = {
os.path.join (outdir, 'index.html'):
'''<META HTTP-EQUIV="refresh" content="0;URL=Documentation/web/index.html">
-<html><body>Redirecting to the documentation index...</body></html>\n''',
+<html>
+<head>
+<title>Redirecting...</title>
+<meta name="author" content="This file was autogenerated by %s">
+</head>
+<body>Redirecting to the documentation index...</body>
+</html>
+''' % sys.argv[0],
os.path.join (outdir, 'VERSION'):
package_version + '\n',
}
os.path.join (outdir, 'VERSION'):
package_version + '\n',
}