From d7662d9e6095c0d275e011137814156fe3586b6f Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 20:11:09 +0000 Subject: [PATCH] lilypond-0.1.62 --- Documentation/tex/mudela.doc | 9 ++--- bin/add-html-footer.py | 74 ++++++++++++++++++++++++++++++++++++ make/WWW.make | 1 + 3 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 bin/add-html-footer.py diff --git a/Documentation/tex/mudela.doc b/Documentation/tex/mudela.doc index 0e0cb6cf02..9ffc13a0ba 100644 --- a/Documentation/tex/mudela.doc +++ b/Documentation/tex/mudela.doc @@ -20,7 +20,6 @@ \usepackage{a4wide} \title{Mudela} \author{Jan Nieuwenhuizen \& Han-Wen Nienhuys} -\date{March 2, 1998} \def\file#1{\verb+#1+} @@ -71,7 +70,7 @@ \chapter{A tutorial} -\emph{\Large ***Under construction***} +\emph{\Large ***Under construction: april 98***} \section{Introduction} @@ -188,7 +187,7 @@ special words and punctation. The remainder of this document explains how to combine these elements to express a piece of music in the language that LilyPond understands. In other words, we try to explain how to use LilyPond, and not how LilyPond works. For want of a better -name we call this language Mudela (short for Music Description +name we call the language Mudela (short for Music Description Language). This document does not cover all of Mudela. Due to technical details, @@ -329,9 +328,9 @@ to cs), Italian, Swedish, Norwegian \section{Handy input} -% \subsection{Durations} -However, having only quarter notes may get a bit dull. +\chapter{Features} + Durations are entered as their reciproce values % a1 a2 a4 a a8 a a16 a a32 a a64 a a a a \begin{mudela}[fragment,verbatim,center] diff --git a/bin/add-html-footer.py b/bin/add-html-footer.py new file mode 100644 index 0000000000..590042719f --- /dev/null +++ b/bin/add-html-footer.py @@ -0,0 +1,74 @@ +#!@PYTHON@ +import os +import sys +import getopt +import __main__ + +lilypath ='' +try: + lilypath = os.environ['LILYPOND_SOURCEDIR'] + '/' +except KeyError: + print 'Please set LILYPOND_SOURCEDIR to the toplevel source, eg LILYPOND_SOURCEDIR=/home/foobar/lilypond-1.2.3/' + sys.exit(1) + +lilypath = lilypath + '/bin/' +sys.path.append(lilypath) + +from lilypython import * + +lilyversion= '' +mailaddress = "unknown" +fullname = "unknown" +news_file = '' + +def set_vars(): + __main__.lilyversion = version_tuple_to_str(lilydirs.version_tuple()) + os.environ["CONFIGSUFFIX"] = 'www'; + __main__.mailaddress= os.environ['MAILADDRESS'] + pw = pwd.getpwuid (os.getuid()); + + __main__.fullname= pw[4]; + + +backstr = '\n
Please take me back to the index\n\ +of LilyPond -- The GNU Project Music typesetter\n\ +
\n\ +This page was built using from lilypond-%s by

\n\ +


%s <%s>
\n\ +

' +set_vars () +banner_file = '' +news_file='' +news ='' +(options, files) = getopt.getopt(sys.argv[1:], '', ['news=']) + +for opt in options: + o = opt[0] + a = opt[1] + if o == '--news': + news_file = a + +def footstr(index): + return backstr % (index, lilyversion, fullname, mailaddress, mailaddress) + +index_file='../../out-www/index.html' +banner = footstr (index_file) +banner_id = '' + + +if news_file: + news = gulp_file (news_file) + i = regex.search ('^\*\*', news) + news = news[:i] + + +for f in files: + s = gulp_file (f) + if news_file: + s = regsub.sub ('top_of_NEWS', '

\n'+ news + '\n\n', s) + + if regex.search (banner_id, s) == -1: + s = regsub.sub ('', '', s) + s = regsub.sub ('', banner_id + banner + '', s) + + dump_file (f, s) diff --git a/make/WWW.make b/make/WWW.make index bb47c54f87..7f9c96fbea 100644 --- a/make/WWW.make +++ b/make/WWW.make @@ -10,4 +10,5 @@ html_subdirs=$(addprefix --subdirs ,$(SUBDIRS)) local-WWW: $(ly_examples) $(ps_examples) $(gif_examples) (cd $(outdir); $(PYTHON) ../$(depth)/bin/mutopia-index.py --prefix=../ --suffix=/$(outdir) $(html_subdirs) $(examples)) + add-html-footer $(outdir)/index.html -- 2.39.5