From: fred Date: Sun, 24 Mar 2002 20:10:52 +0000 (+0000) Subject: lilypond-0.1.60 X-Git-Tag: release/1.5.59~3147 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9419d243df5fb639db20d7c15e5d4333885b3799;p=lilypond.git lilypond-0.1.60 --- diff --git a/bin/mutopia-index.py b/bin/mutopia-index.py index a268cded6e..ba178fdb72 100644 --- a/bin/mutopia-index.py +++ b/bin/mutopia-index.py @@ -16,16 +16,29 @@ from lilypython import * -def gen_list(inputs, filename): +def gen_list(inputs, subdir, filename): + (pre, subdirs, post)=subdir print "generating HTML list %s\n" % filename list = open(filename, 'w') - list.write ('Rendered Examples\n' - 'These example files are taken from the LilyPond distribution.\n' + list.write ('Rendered Examples\n') + list.write ('') + if len(subdirs): + list.write ('

subdirectories

') + list.write ('') + + list.write('

Contents of this directory

\n'); + list.write ('These example files are taken from the LilyPond distribution.\n' 'LilyPond currently only outputs TeX and MIDI. The pictures and\n' 'PostScript files were generated using TeX, Ghostscript and some\n' 'graphics tools. The papersize used for these examples is A4. The GIF\n' 'files have been scaled to eliminate aliasing.\n'); + for ex in inputs: print '%s, ' % ex header = read_mudela_header(ex + '.ly.txt') @@ -65,4 +78,22 @@ def gen_list(inputs, filename): allfiles = multiple_find (['*.ly.txt'], '.') -gen_list (sys.argv[1:], 'index.html') +import getopt + +(cl_options, files) = getopt.getopt(sys.argv[1:], + 'hs:', ['help', 'subdirs=', 'suffix=', 'prefix=']) +subdir_pre='' +subdir_suf ='' + +subdirs =[] +for opt in cl_options: + o = opt[0] + a = opt[1] + if o == '--subdirs' or o == '-s': + subdirs.append (a) + elif o == '--prefix': + subdir_pre = a + elif o == '--suffix': + subdir_suf = a + +gen_list (files, (subdir_pre, subdirs, subdir_suf), 'index.html') diff --git a/make/Toplevel.make.in b/make/Toplevel.make.in index f376ebc313..d3dfff3081 100644 --- a/make/Toplevel.make.in +++ b/make/Toplevel.make.in @@ -64,3 +64,14 @@ Makefile: make/Toplevel.make.in cat $< >> $@ chmod -w $@ + +website: + + +examples: + $(MAKE) CONFIGSUFFIX='www' -C input WWW + $(MAKE) CONFIGSUFFIX='www' -C mutopia WWW + tar cfz $(outdir)/examples.tar.gz `find input mutopia -type d -name 'out-www' -print` + + + diff --git a/make/WWW.make b/make/WWW.make index 58379aed6e..bb47c54f87 100644 --- a/make/WWW.make +++ b/make/WWW.make @@ -5,7 +5,9 @@ ps_examples=$(addprefix $(outdir)/, $(addsuffix .ps.gz, $(examples))) gif_examples=$(addprefix $(outdir)/, $(addsuffix .gif, $(examples))) +html_subdirs=$(addprefix --subdirs ,$(SUBDIRS)) -WWW: $(ly_examples) $(ps_examples) $(gif_examples) - (cd $(outdir); $(PYTHON) ../$(depth)/bin/mutopia-index.py $(examples)) + +local-WWW: $(ly_examples) $(ps_examples) $(gif_examples) + (cd $(outdir); $(PYTHON) ../$(depth)/bin/mutopia-index.py --prefix=../ --suffix=/$(outdir) $(html_subdirs) $(examples)) diff --git a/mutopia/Coriolan/Makefile b/mutopia/Coriolan/Makefile index 40ce58e198..1b13f7fcf5 100644 --- a/mutopia/Coriolan/Makefile +++ b/mutopia/Coriolan/Makefile @@ -7,3 +7,6 @@ depth = ../.. # generic stuff/Makefile # include ./$(depth)/make/Mutopia.make + +examples=coriolan oboi-part +include $(depth)/make/WWW.make