]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.60.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 17 Jun 2000 14:10:49 +0000 (16:10 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 17 Jun 2000 14:10:49 +0000 (16:10 +0200)
1.3.60.jcn1
===========

* Webpage hacking

---
Generated by janneke@gnu.org,
From = lilypond-1.3.60, To = lilypond-1.3.60.jcn1

usage

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.3.60.jcn1.diff

Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure

CHANGES
Documentation/footer.html.in
Documentation/header.html.in [new file with mode: 0644]
Documentation/topdocs/index.tely
VERSION
stepmake/bin/add-html-footer.py
stepmake/stepmake/documentation-vars.make

diff --git a/CHANGES b/CHANGES
index 3e50dfcb1e0e0ee661aa4a1126aeb636ecc9e1d1..6e10892ca7f4ee2a5b516b03aba1e524b9023482 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,14 @@
-1.3.60.mb1
+--- ../lilypond-1.3.60/CHANGES Fri Jun 16 16:45:48 2000
+++ b/CHANGES   Sat Jun 17 16:10:49 2000
+@@ -1,3 +1,8 @@
+1.3.60.jcn1
+===========
+
+* Webpage hacking
+
+ 1.3.59.hwn1
+ ===========
+ 1.3.60.mb1
 ===========
 
 * First attempt to reintroduce support for keys with different
index 1930f851afd9bb0189b777701dfe6dd247c3fece..bcae009876f14208e2ba654642626be628c3f6ff 100644 (file)
@@ -1,3 +1,10 @@
+
+<! shamefully inspired by Franc,ois Pinard's TP pages >
+
+    </td>
+  </tr>
+</table>
+
 <!--
 
 if this file ./Documentation/footer.html.in is present, it is included
diff --git a/Documentation/header.html.in b/Documentation/header.html.in
new file mode 100644 (file)
index 0000000..e96b3aa
--- /dev/null
@@ -0,0 +1,26 @@
+
+<! your header here >
+<! shamefully inspired by Franc,ois Pinard's TP pages >
+
+<! ur* can't we generate this with @table from a .texi? >
+
+<bgcolor="grey">
+<table cellpadding=5 width="100%">
+  <tr>
+    <td align=left valign=top width="15%" bgcolor="grey">
+    <table align=left>
+      <tr><td bgcolor="cyan"><b>General info</b></td></tr>
+      <tr><td><font size=-1>
+          <a href="http://www.lilypond.org"><b>Entry page</b></a><br>
+          <a href="http://appel.dyndns.org/lilypond"><b>Hacking</b></a><br>
+      </td></tr>
+      <tr><td bgcolor="cyan"><b>Download Source</b></td></tr>
+      <tr><td><font size=-1>
+          <a href="ftp://ftp.gnu.org/pub/gnu/lilypond"><b>Stable</b></a><br>
+          <a href="ftp://cs.uu.nl/pub/gnu/LilyPond/development"><b>Development</b></a><br>
+      </td></tr>
+  </table>
+  <! /tr >
+  <td align=left valign=top width="90%">
+
+
index 86cd87f159509e1d1bfaf952c6219ff3bb65054c..1ee15eb97015a4c85497fee9796bf0c1d771755a 100644 (file)
@@ -46,7 +46,7 @@ this:
 
 @quotation
 @mudela[fragment,verbatim]
-       \relative c'' { \key es; r8 [c16 b] [c8 g] [as c16 b] [c8 d] | g,4 }
+       \relative c'' { \key es \major; r8 [c16 b] [c8 g] [as c16 b] [c8 d] | g,4 }
 @end mudela 
 @end quotation
 
diff --git a/VERSION b/VERSION
index 50f985861369a5158fd5d15485d9a7a5c3013440..d8141361f52a02402dea87aa6ca497291b88d7a9 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=60
-MY_PATCH_LEVEL=mb1
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 705ed904a05f76f3ffbe7d99db2110813624d934..adb115208822fc8537e15520a52a258589652730 100644 (file)
@@ -9,13 +9,11 @@ import os
 import time
 import string 
 import getopt
-import __main__
 
 fullname = "unknown"
 index_file=''
-banner_file = ''
 changelog_file=''
-changes =''
+package_name = ''
 package_version = ''
 
 mail_address = '(address unknown)'
@@ -24,17 +22,18 @@ try:
 except KeyError:
        pass
 
-
 webmaster= mail_address
 try:
        webmaster= os.environ['WEBMASTER']
 except KeyError:
        pass
 
+header_file = ''
+footer_file = ''
+default_header = r"""
+"""
 
-
-footer_fn = ''
-footer = r"""<hr>Please take me <a href=%s>back to the index</a>
+default_footer = r"""<hr>Please take me <a href=%s>back to the index</a>
 of %s
 <!-- package name %s>
  <!-- webmaster fields. %s %s>
@@ -44,13 +43,8 @@ builtstr = r"""<hr><font size=-1>
 This page was built from %s-%s by 
 <address><br>%s &lt<a href="mailto:%s">%s</a>&gt,  %s.</address><p></font>"""
 
-package_name = ''
-
-(options, files) = getopt.getopt(sys.argv[1:], 'c:hp:', [
-       'name=', 'footer=', 'version=',
-       'changelog=', 'help', 'news=', 'index=']) 
 
-def gulp_file(f):
+def gulp_file (f):
        try:
                i = open(f)
                i.seek (0, 2)
@@ -67,33 +61,45 @@ def gulp_file(f):
 
 def help ():
        sys.stdout.write (r"""Usage: add-html-footer [OPTION]... HTML-FILE
-Add a nice footer, add the top of the ChangLog file (up to the ********)
+Add header, footer and top of ChangLog file (up to the ********) to HTML-FILE
+
 Options:
--h, --help                print this help
---version                 package version
---name                    package_name
---footer                  footer file
+  --changelog=FILE          use FILE as ChangeLog [ChangeLog]
+  --footer=FILE             use FILE as footer
+  --header=FILE             use FILE as header
+  -h, --help                print this help
+  --index=URL               set homepage to URL
+  --name=NAME               set package_name to NAME
+  --version=VERSION         set package version to VERSION
 """)
        sys.exit (0)
 
+(options, files) = getopt.getopt(sys.argv[1:], 'h', [
+       'changelog=', 'footer=', 'header=', 'help', 'index=',
+       'name=', 'version=']) 
+
 for opt in options:
        o = opt[0]
        a = opt[1]
-       if o == '--news' or o == '--changelog' or o == '-c':
+       if o == '--changelog':
                changelog_file = a
+       elif o == '--footer':
+               footer_file = a
+       elif o == '--header':
+               header_file = a
+       elif o == '-h' or o == '--help':
+               help ()
        elif o == '--index':
                index_file = a
-       elif o == '--footer':
-               footer_fn = a
        elif o == '--name':
                package_name = a
-       elif o == '-h' or o == '--help':
-               help ()
        elif o == '--version':
                package_version = a
        else:
                raise 'unknown opt ', o
-def set_vars():
+
+def set_vars ():
+       global fullname
        os.environ["CONFIGSUFFIX"] = 'www';
        if os.name == 'nt':
                import ntpwd
@@ -102,36 +108,38 @@ def set_vars():
                import pwd
                pw = pwd.getpwuid (os.getuid());
 
-       f =pw[4]
+       f = pw[4]
        f = string.split (f, ',')[0]
-       __main__.fullname=f 
-set_vars ()
+       fullname = f 
 
+#burp
+def compose_header ():
+       global default_header
+       head = default_header
+       if header_file:
+               head = gulp_file (header_file)
+       return head
 
-def footstr(index):
-       ft = __main__.footer
+def compose_footer (index):
+       global default_footer
+       foot = default_footer
 
-       if footer_fn:
-               try:
-                       ft = open (footer_fn).read ()
-               except:
-                       raise 'oops: ' , footer_fn
+       if footer_file:
+               foot = gulp_file (footer_file)
 
-
-       s = ft % (index, package_name, package_name, webmaster, webmaster)
+       s = foot % (index, package_name, package_name, webmaster, webmaster)
        s = s + builtstr % (package_name, package_version, fullname,
                            mail_address, mail_address, 
                            time.strftime ('%c %Z', time.localtime (time.time ())))
        return s
 
-banner = footstr (index_file)
-banner_id = '<! banner_id >'
-
-
-
+set_vars ()
+header = compose_header ()
+footer = compose_footer (index_file)
+header_tag = '<! header_tag >'
+footer_tag = '<! footer_tag >'
 
 def do_file (s):
-
        if changelog_file:
                changes = gulp_file (changelog_file)
                # urg?
@@ -141,24 +149,31 @@ def do_file (s):
                        changes = changes[:m.start (0)]
                s = re.sub ('top_of_ChangeLog', '<XMP>\n'+ changes  + '\n</XMP>\n', s)
 
+       if re.search (header_tag, s) == None:
+               body='<BODY BGCOLOR=WHITE><FONT COLOR=BLACK>'
+               s = re.sub ('(?i)<body>', body, s)
+               if re.search ('(?i)<BODY', s):
+                       s = re.sub ('(?i)<body[^>]*>', body + header, s)
+               elif re.search ('(?i)<html', s):                
+                       s = re.sub ('(?i)<html>', '<HTML>' + header, s)
+               else:
+                       s = header + s
 
-       if re.search (banner_id, s) == None:
-               s = banner_id + s
-       else:
-               return s
-
-       s = re.sub ('(?i)<body>', '<BODY BGCOLOR=WHITE><FONT COLOR=BLACK>', s)
-       # do title.
-       #s = check_tag ('<body', '', s, 0)
-       if re.search ('(?i)</body', s):
-               s = re.sub ('(?i)</body>', banner + '</BODY>', s)
-       elif re.search ('(?i)</html', s):               
-               s = re.sub ('(?i)</html>', banner + '</HTML>', s)
-       else:
-               s = s + banner
+               s = header_tag + s
+
+       if re.search (footer_tag, s) == None:
+               s = s + footer_tag
+
+               if re.search ('(?i)</body', s):
+                       s = re.sub ('(?i)</body>', footer + '</BODY>', s)
+               elif re.search ('(?i)</html', s):               
+                       s = re.sub ('(?i)</html>', footer + '</HTML>', s)
+               else:
+                       s = s + footer
 
        return s
 
+
 for f in files:
        s = gulp_file (f)
        s = do_file (s)
index 6fb5343eaeb591949d67cc293869595d7ebbb2f8..440e6b94100f39ab594d633c7fa25589e15b612b 100644 (file)
@@ -3,7 +3,7 @@ AT_FILES = $(BLURBS) #
 at-dir = $(doc-dir)/
 at-ext = .in
 
-footify=$(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION) --footer $(depth)/Documentation/footer.html.in
+footify=$(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION) --header=$(depth)/Documentation/header.html.in --footer $(depth)/Documentation/footer.html.in
 
 footify-all-command=$(footify) `$(FIND) . -name '*.html' -print`