]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/index.texi: Add, fix, change some links and names,
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 23 Jul 2002 11:36:53 +0000 (11:36 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 23 Jul 2002 11:36:53 +0000 (11:36 +0000)
including dump of wiki wiki.

* Documentation/GNUmakefile (local-WWW): Slurp wiki.

* buildscripts/wiki-slurp.py: New file.  Accept multiple pattern.
(unwiki): Replace local urls with <img src> too.

* Documentation/GNUmakefile (wiki-dump): New target.

* Documentation/header.html.in: Link to Documentation/index
renamed to Index (was other...).

* make/lysdoc-targets.make (local-WWW): Add default targets .ps.gz
and .pdf.

ChangeLog
Documentation/GNUmakefile
Documentation/header.html.in
Documentation/index.texi
buildscripts/wiki-slurp.py [new file with mode: 0644]
make/ly-targets.make
make/lysdoc-targets.make

index dd0651fe326f37109d60f749aa4b09e48f3a9272..f31ce7f9e0b6ece45673960164d08646ab133bf3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2002-07-23  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * Documentation/index.texi: Add, fix, change some links and names,
+       including dump of wiki wiki.
+
+       * Documentation/GNUmakefile (local-WWW): Slurp wiki.
+
+       * buildscripts/wiki-slurp.py: New file.  Accept multiple pattern.
+       (unwiki): Replace local urls with <img src> too.
+
+       * Documentation/GNUmakefile (wiki-dump): New target.
+
+       * Documentation/header.html.in: Link to Documentation/index
+       renamed to Index (was other...).
+
+       * Documentation/regression-test.tely: Remove.
+
+       * make/lysdoc-targets.make (local-WWW): Add default targets .ps.gz
+       and .pdf.
+
 2002-07-22  Han-Wen  <hanwen@cs.uu.nl>
 
        * VERSION: 1.5.69 released
index c690d4e9b3786b3025075dcf0470973304b0a9ad..f98a1322c3755b0025431a0780db6f91fabcf33c 100644 (file)
@@ -20,7 +20,18 @@ PS_FILES=$(outdir)/regression-test.ps
 PDF_FILES=$(PS_FILES:.ps=.pdf)
 PS_GZ_FILES=$(addsuffix  .gz, $(PS_FILES))
 
-local-WWW: copy-for-me txt-to-html $(PS_GZ_FILES) $(PDF_FILES) $(outdir)/regression-test.html footify
+
+wiki-dump = $(outdir)/wiki-dump/LilyPond.html
+wiki-slurp: $(wiki-dump)
+
+$(wiki-dump):
+       mkdir -p $(outdir)/wiki-dump
+       $(PYTHON) $(buildscript-dir)/wiki-slurp.py -d $(outdir)/wiki-dump 'http://lilypond.org/wiki/?' 'http://lilypond.org/wiki/'
+foe:
+       mkdir -p $(outdir)/wiki-dump/images
+       ln -f $(builddir)/Documentation/pictures/$(outbase)/lelie-icon.png $(outdir)/wiki-dump/images/wikibase.png
+
+local-WWW: copy-for-me txt-to-html $(PS_GZ_FILES) $(PDF_FILES) $(outdir)/regression-test.html wiki-slurp footify
 
 copy-for-me:
        $(foreach a, $(README_TOP_FILES), cp ../$(a) $(outdir)/$(a).txt && ) true
index f5a7104cacd2a6650c196fb0b1cf70b3a5c16b2b..199e2cd117a1a9299d461387cdb6570b690406c0 100644 (file)
@@ -60,7 +60,7 @@ which substitutes some @AT_VARIABLES@ as well.
        <a href="@TOP@Documentation/user/out-www/lilypond/Tutorial.html">Tutorial</a><br>
        <a href="@TOP@Documentation/user/out-www/lilypond/lilypond.html">Manual</a><br>
        <a href="@TOP@Documentation/user/out-www/glossary.html">Glossary</a><br>
-       <a href="@TOP@Documentation/out-www/index.html">other ...</a><br>
+       <a href="@TOP@Documentation/out-www/index.html">Index</a><br>
        <br>
       </font></td></tr>
       <tr><td bgcolor="#e8e8ff">
index 175687c4d76ba07853651322ed048fbba4a79813..f350e616009c7cca6ab1b932431cf0153aaf8610 100644 (file)
@@ -21,8 +21,9 @@
 @item @uref{DEDICATION.html,Dedication}  Lily is  dedicated to our friends.
 @item @uref{http://www.gnu.org/copyleft/gpl.html,GPL} it is released under
   the GNU GPL.
-@item @uref{http://www.lilypond.org/wiki, Lilypond Wiki} A wikiwiki site
-  dedicated to lilypond.
+@item @uref{http://www.lilypond.org/wiki, LilyPond Wiki} A wikiwiki site
+  devoted to LilyPond.  Also available as a local
+  @uref{wiki-dump/LilyPond.html, Frozen Copy}.
 @end itemize
 
 @html
@@ -55,7 +56,7 @@ How to install on Windows.
 @unnumberedsubsubsec Support
 
 @itemize @bullet
-@item @uref{../../index.html,index} What is Lilypond?
+@item @uref{../../index.html,Front Page} What is LilyPond?
 @item @uref{../topdocs/out-www/FAQ.html,mini-FAQ} Mini FAQ -- very
 frequently asked questions, with answers.
 @item @uref{http://www.lilypond.org/wiki?LilyPondFaqs,FAQs} Frequently
@@ -91,29 +92,32 @@ the mailing lists.
 
 @item
 @uref{../user/out-www/lilypond/Reference-Manual.html,Reference-Manual}
-The reference manual.
+The reference manual, and 
+@uref{../user/out-www/lilypond/Index.html,Master Index}.
 
-@item @uref{../user/out-www/lilypond/lilypond.html,lilypond} The complete
+@item @uref{../user/out-www/lilypond/lilypond.html,Top Table of Contents} The complete
 user manual, (in @uref{../user/out-www/lilypond.ps.gz,PostScript} and
 @uref{../user/out-www/lilypond.pdf,PDF}). This manual contains among
 others the tutorial, the reference manual.  The HTML version is also
 available as @uref{../user/out-www/lilypond.html,one big page}.
 
 @c glossary maybe for new users?
-@item @uref{../user/out-www/glossary.html,glossary} A glossary of musical
+@item @uref{../user/out-www/glossary.html,Glossary} A glossary of musical
 terms, including translations.  (in
-@uref{../user/out-www/glossary.ps.gz,Postscript}
+@uref{../user/out-www/glossary.ps.gz,PostScript}
 and
-@uref{../user/out-www/glossary.pdf,PDF})  Read this if you're not
+@uref{../user/out-www/glossary.pdf,PDF}) Read this if you're not
 familiar with English terms for notation.
 
-@item @uref{../user/out-www/lilypond-internals/lilypond-internals.html,lilypond-internals}
+@item @uref{../user/out-www/lilypond-internals/lilypond-internals.html,Lilypond-Internals}
 Full documentation of internals, generated from the sources.  If you
 want to fine-tune output, you need the information in this document.
 
 @item @uref{../../input/test/out-www/test.html,Input snippets}
 All of the example input snippets, with the corresponding output
-shown.
+shown.  Also available in
+@uref{../../input/test/out-www/test.ps.gz,PostScript} and
+@uref{../../input/test/out-www/test.pdf,PDF} formats.
 @end itemize
 
 
@@ -129,22 +133,23 @@ shown.
 
 @itemize @bullet
 @item @uref{../../input/regression/out-www/regression.html,Regression Tests}
-A large document that tests all kinds of features.  (also as
-@uref{../out-www/regression-test.ps.gz,Postscript} and
-@uref{../out-www/regression-test.pdf,PDF}).
+A large document with snippets that test all basic features.  Also
+available in
+@uref{../../input/regression/out-www/regression.ps.gz,PostScript} and
+@uref{../../input/regression/out-www/regression.pdf,PDF} formats.
 @item
-@uref{http://www2.iro.umontreal.ca/~pinard/po/registry.cgi?domain=lilypond">Translations,lilypond
-textual domain
-}  in the Translation Project.
+@uref{http://www2.iro.umontreal.ca/~pinard/po/registry.cgi?domain=lilypond">Translations,Lilypond
+Textual Domain
+} in the Translation Project.
 @item Compiling for @uref{../windows/out-www/compiling.html,Windows/Cygwin}.
 @end itemize
 
 
 @unnumberedsubsec Logo
 @itemize @bullet
-@item @uref{../pictures/out-www/lelieblond.png, logo} in large size
-@item @uref{../pictures/out-www/lelie-logo.png, logo} in medium size
-@item @uref{../pictures/out-www/lelie-icon.png, logo} in small size
+@item Logo at @uref{../pictures/out-www/lelieblond.png, large} size.
+@item Logo at @uref{../pictures/out-www/lelie-logo.png, medium} size.
+@item Logo at @uref{../pictures/out-www/lelie-icon.png, small} size.
 @end itemize
 
 
diff --git a/buildscripts/wiki-slurp.py b/buildscripts/wiki-slurp.py
new file mode 100644 (file)
index 0000000..bb25192
--- /dev/null
@@ -0,0 +1,155 @@
+#!@PYTHON@
+
+#
+# translate an entire Wiki site into local html.
+#
+
+import re
+import urllib
+import sys
+import getopt
+import os
+program_version = '@TOPLEVEL_VERSION@'
+if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
+       program_version = '1.5.69'
+
+
+def help ():
+       print """Usage: wiki-slurp.py [OPTION]... ENTRY-PATTERN...
+
+Download a WikiWiki site and convert to local html.
+
+Example: wiki-slurp.py -d /tmp/output 'http://c2.com/cgi-bin/wiki?'
+
+Options:
+  -h,--help          this help
+  -m,--mangle        mangle file names to be shorter 
+  -d,--outdir=DIR    set output directory to DIR
+  -v,--version       version information
+
+Warning: downloading an entire Wiki site generates a huge amount of
+traffic and server load.  Consider asking for a copy of the database.
+See also http://c2.com/cgi-bin/wiki?WikiSlurp
+
+Report bugs to bug-lilypond@gnu.org.
+
+Written by Han-Wen Nienhuys <hanwen@cs.uu.nl>
+"""
+
+def print_version ():
+       print r"""wiki-slurp.py %s
+
+This is free software.  It is covered by the GNU General Public License,
+and you are welcome to change it and/or distribute copies of it under
+certain conditions.  Invoke as `midi2ly --warranty' for more information.
+
+Copyright (c) 2000-2002 by Han-Wen Nienhuys <hanwen@cs.uu.nl>
+""" % program_version
+
+(options, files) = getopt.getopt (sys.argv[1:], 'vd:hm', ['help','mangle','version', 'outdir='])
+
+
+def identity (name):
+       return name
+
+def mangle (name):
+       return '%d' % hash (name)
+
+mangler = identity
+
+outdir = '/tmp/'
+
+for opt in options:
+       o = opt[0]
+       a = opt[1]
+       if o== '--help' or o == '-h':
+               help ()
+               sys.exit (0)
+       elif o == '--version' or o == '-v':
+               print_version ()
+               sys.exit(0)
+       elif  o == '--mangle' or o == '-m':
+               mangler = mangle
+       elif o == '--outdir' or o == '-d':
+               outdir = a
+       else:
+               print o
+               raise getopt.error
+
+
+patterns = files
+
+if not patterns:
+       help ()
+       sys.stderr.write ("\n")
+       sys.exit (2)
+
+re_patterns = []
+for pattern in patterns:
+       re_patterns.append (re.sub ('([?.])', '\\\\\\1', pattern))
+
+todo = ["FrontPage"]
+
+print 'here!'
+done = {
+       'EditText': 1,  
+       }
+
+def unwiki (str, pat, mangler):
+       local = '<a href="%s([A-Za-z]+)">([A-Za-z]+)</a>' % pat
+
+       newurls = []
+       def do_replace (match, us = newurls, mangler = mangler):
+               newurl = match.group (1)
+               local = mangler (newurl)
+               
+               replacement = '<a href="%s.html">%s</a>' % (local,newurl)
+               us.append (newurl)
+               return replacement
+
+       str = re.sub (local, do_replace, str)
+       otherurl = '<a href="%s[^>]*">([?A-Za-z]+)</a>' % pat
+       str = re.sub (otherurl, '\\1', str)
+
+       imagesrc = '<a href="%s[^>]*">(<img[^>]*>)</a>' % pat
+       str = re.sub (imagesrc, '\\1', str)
+       
+       return (str, newurls)
+
+
+while todo:
+       f = todo[-1]
+       todo = todo[:-1]
+
+       if done.has_key (f):
+               continue
+       done [f] = 1
+
+       mangled = mangler (f)
+       
+       sys.stderr.write ("reading `%s' ... " % f)
+       sys.stderr.flush ()
+
+       page = urllib.urlopen (patterns[0] + f).read ()
+       sys.stderr.write ('done. ')
+       sys.stderr.flush ()
+
+       for re_pattern in re_patterns:
+               (page, nus) = unwiki (page, re_pattern, mangler)
+               todo.extend (nus)
+       
+       outname = os.path.join (outdir, mangled) + '.html'
+       fo = open (outname, 'w')
+
+       sys.stderr.write ("Writing `%s'\n" % outname)
+       fo.write (page)
+       fo.close ()
+
+
+# test
+if 0:
+       page = open ('/tmp/FrontPage.html').read()
+       (str, us)=unwiki (page, re_patterns)
+       print str
+       print us
+
index 3d27237276e83dd456f682b94c2cf4d7dbda7f36..d01701d8593b223465114cf46e6b2dc19a3d1caf 100644 (file)
@@ -1,5 +1,3 @@
-# empty
-
 convert-ly: local-convert-ly
        $(LOOP)
 
@@ -14,4 +12,3 @@ local-ly-help:
 "\
 #
 
-
index 51d4aace224371199881df98488c9da45a9c2696..24f635cc0229e4512b64a6a78808e86ecc1fe7e3 100644 (file)
@@ -1,2 +1,2 @@
 
-local-WWW: $(outdir)/$(NAME).html
\ No newline at end of file
+local-WWW: $(outdir)/$(NAME).html $(outdir)/$(NAME).ps.gz $(outdir)/$(NAME).pdf
\ No newline at end of file