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.
+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
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
<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">
@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
@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
@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
@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
--- /dev/null
+#!@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
+
-# empty
-
convert-ly: local-convert-ly
$(LOOP)
"\
#
-
-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