From: fred Date: Sun, 24 Mar 2002 20:11:50 +0000 (+0000) Subject: lilypond-0.1.64 X-Git-Tag: release/1.5.59~3094 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c814b90792a6180e3adb0fc7732c1095e2042570;p=lilypond.git lilypond-0.1.64 --- diff --git a/Documentation/Makefile b/Documentation/Makefile index c3cf69814f..e8fe751ce9 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -22,10 +22,10 @@ include ./$(depth)/make/Docrules.make # +DATAFILES = $(wildcard *.data) TEXTFILES = $(OUTPODFILES:.pod=$(DOTTEXT)) GROFFFILES = $(OUTPODFILES:.pod=.1) -HTMLFILES = $(OUTPODFILES:.pod=.html) - +HTMLFILES = $(OUTPODFILES:.pod=.html) $(datafiles) default: do-doc @@ -37,24 +37,21 @@ giffiles = $(addprefix $(outdir)/,$(XPMS:.xpm=.gif)) gifs: $(giffiles) -EXTRA_DISTFILES = $(XPMS) vocabulary-data vocabulary-forms.el automake.urgh\ +datafiles = $(addprefix $(outdir)/,$(DATAFILES:.data=.html)) + +EXTRA_DISTFILES = $(XPMS) vocabulary.data vocabulary-forms.el automake.urgh\ gnu-music-history # don't do DVI files. They can only be made if lily is installed -do-doc: ugh-mutopia $(TEXTFILES) +do-doc: $(TEXTFILES) readme-topfiles: cd $(depth); for i in $(README_TOPFILES); do \ - ln -f $$i Documentation/$(outdir); done - -$(outdir)/%$(DOTTEXT): $(depth)/%$(DOTTEXT) - rm -f $@ - ln $< $@ + ln -f $$i Documentation/$(outdir)/$$i$(DOTTEXT); done README_TOPFILES=NEWS DEDICATION TODO ANNOUNCE-0.1 README_TXTFILES=$(addprefix $(outdir)/,$(addsuffix $(DOTTEXT), $(README_TOPFILES))) -#local-WWW: $(HTMLFILES) $(README_TXTFILES) $(giffiles) local-WWW: $(HTMLFILES) readme-topfiles $(README_TXTFILES) $(giffiles) # generic targets and rules: @@ -63,10 +60,8 @@ include $(depth)/make/Targets.make include $(depth)/make/Rules.make # ugh -check-doc-deps: - @echo hi +check-doc-deps: do-doc + @echo # hi doc: do-doc -ugh-mutopia: $(outdir)/mutopia.1 - troff -man -Tascii $< | grotty -b -u -o > $(outdir)/mutopia$(DOTTEXT) diff --git a/bin/table-to-html.py b/bin/table-to-html.py new file mode 100755 index 0000000000..bc4bc7152a --- /dev/null +++ b/bin/table-to-html.py @@ -0,0 +1,92 @@ +#!@PYTHON@ + +# +# table-to-html.py -- convert char-separated table to html table +# +# source file of the GNU LilyPond music typesetter +# +# (c) 1998 Jan Nieuwenhuizen +# + +import getopt +from string import * +import regex +import regsub +import os +import sys +import time + +version = '0.1' + +lilypath ='' +try: + lilypath = os.environ['LILYPOND_SOURCEDIR'] + '/' +except KeyError: + try: + lilypath = os.environ['top_srcdir'] + '/' + except KeyError: + print 'Please set LILYPOND_SOURCEDIR to the toplevel source, eg LILYPOND_SOURCEDIR=/home/foobar/lilypond-1.2.3/' + +lilypath = lilypath + '/bin/' +sys.path.append (lilypath) + +from flower import * + +def program_id (): + return 'table-to-html.py version ' + version; + +def identify (): + sys.stdout.write (program_id () + '\n') + +def help (): + sys.stdout.write ("Usage: table-to-html [options] TABLE_FILE HTML_FILE\n" + + "Generate mozarella metrics table from preparated feta log\n\n" + + "Options:\n" + + " -h, --help print this help\n" + + " -s, --separator=SEP specify separator [:]\n") + sys.exit (0) + + +def header (html): + html.write ('') + +def footer (html): + html.write ('
') + +def convert (inname, outname, separator): + table = File (inname) + # ugh + html = File (outname, 'w') + + header (html) + while not table.eof (): + line = table.readline () + columns = split (line, separator) + html_line = '' + join (columns, '') + '' + html.write (html_line) + table.close () + footer (html) + html.close () + + +def main (): + identify () + (options, files) = getopt.getopt ( + sys.argv[1:], 'hs:', ['help','separator=']) + + separator = ':' + for opt in options: + o = opt[0] + a = opt[1] + if o == '--separator' or o == '-s': + separator = a + elif o== '--help' or o == '-h': + help () + else: + print o + raise getopt.error + + convert (files[0], files[1], separator) + +main () +