DVI_FILES = $(addprefix $(outdir)/,$(DOC_FILES:.doc=.dvi) $(TELY_FILES:.tely=.dvi))
-
-
-OUTDOC_FILES = $(addprefix $(outdir)/, $(DOC_FILES))
-OUTTEX_FILES = $(addprefix $(outdir)/, $(TEX_FILES))
+#OUTDOC_FILES = $(addprefix $(outdir)/, $(DOC_FILES))
+#OUTTEX_FILES = $(addprefix $(outdir)/, $(TEX_FILES))
EXTRA_DIST_FILES= $(DOC_FILES) $(DATA_FILES) $(EL_FILES) $(TEX_FILES) testje.fly
HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
-PS_FILES = $(DVI_FILES:.dvi=.ps)
+PS_FILES = $(DVI_FILES:.dvi=.ps) $(OUTDOC_FILES:.doc=.ps) $(OUTTEX_FILES:.tex=.ps)
+PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
STEPMAKE_TEMPLATES=tex texinfo documentation
LOCALSTEPMAKE_TEMPLATES=lilypond mudela
-local-WWW: $(HTML_FILES) $(OUTDOC_FILES:.doc=.ps.gz) $(OUTTEX_FILES:.tex=.ps.gz) $(datafiles)
- $(PYTHON) $(step-bindir)/ls-latex.py --package=$(topdir) --title 'LaTeX documents about LilyPond' \
- $(DOC_FILES) $(TEX_FILES)\
+local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES)
+ $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation about LilyPond' \
+ $(DOC_FILES) $(TEX_FILES) $(TELY_FILES) \
| sed "s!$(outdir)/!!g" > $(outdir)/index.html
$(PYTHON) $(step-bindir)/add-html-footer.py --package=$(topdir) $(outdir)/index.html
% display all feta chars in a pretty picture
% GNU LilyPond
% (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+%
+% urg: fool ls-latex
+\def\urg{
+\title{The Feta font}
+\author{JCN}
+\begin{document}
+}
+
\parindent0pt
\nopagenumbers
@setfilename reference-manual.info
@settitle LilyPond 1-2-0 Reference Manual
+@c ls-latex
+@ignore
+@author Adrian Mariano, Han-Wen Nienhuys and Jan Nieuwenhuizen
+@title LilyPond Regression test
+@end ignore
+
+
@ifinfo
This is the reference documentation to LilyPond. It is not a tutorial.
@setfilename regression-test.info
@settitle LilyPond Regression test
+@c fool ls-latex
+@ignore
+@author Han-Wen Nienhuys and Jan Nieuwenhuizen
+@title LilyPond Regression test
+@end ignore
+
@node Top, , ,
This document tries give an brief overview of LilyPond features. When
-\\input texinfo @c -*-texinfo-*-
+\input texinfo @c -*-texinfo-*-
@setfilename tutorial.info
@settitle Typesetting music with LilyPond
-
@ifinfo
This is a short tutorial to show you how LilyPond works. It is not a
Copyright 1999 by its authors.
@end ifinfo
+
@titlepage
+
+@c fool ls-latex: why not use these, for texinfo??
+@ignore
+@author Han-Wen Nienhuys
+@title Typesetting music with LilyPond
+@end ignore
+
@sp 10
@comment The title is printed in a large font.
@center @titlefont{LilyPond tutorial}
To view this output, issue the command `@code{xdvi menuet}'.
Now that we are familiar with the procedure of producing output, we
-will analyse the input, line by line.@example
+will analyse the input, line by line.
+@ignore
+Let's try to redo this
+@example
% lines preceded by a percent are comments.
@end example
The percent sign, `@code{%}', introduces a line comment. If you want to
make larger comments, you can use block comments. These are delimited
-by `@code{%@{}' and `@code{%@}}'@example
+by `@code{%@{}' and `@code{%@}}'
+@end ignore
+@multitable @columnfractions .60 .39
+@item
+@noindent
+@c @example urg: no tt font
+@c @exdent % lines preceded by a percent are comments.
+@exdent @code{% lines preceded by a percent are comments.}
+@c @end example
+@tab
+The percent sign, `@code{%}', introduces a line comment. If you
+want to make larger comments, you can use block comments. These
+are delimited by `@code{%@{}' and `@code{%@}}'
+@end multitable
+@example
\input "paper16.ly"
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=2
-PATCH_LEVEL=5
+PATCH_LEVEL=6
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
-%!PS-Adobe-1.0: lily.ps
-%
-% 2 setlanguagelevel % hmm. auto_resize_dicts doesn't help either.
-% round cappings
-1 setlinecap
-
-
-/draw_beam % width slope thick
-{
- 2 div /beam_thick exch def
- /beam_slope exch def
- /beam_wd exch def
- beam_slope beam_wd mul /beam_ht exch def
- 0 beam_thick neg moveto
- beam_wd beam_ht rlineto
- 0 beam_thick 2 mul rlineto
- 0 beam_thick lineto
- closepath fill
-} bind def
-
-/draw_decrescendo % width height cons thick
-{
- setlinewidth
- /cresc_cont exch def
- /cresc_ht exch def
- /cresc_wd exch def
-
- cresc_wd cresc_cont moveto
- 0 cresc_ht lineto
- stroke
- cresc_wd cresc_cont neg moveto
- 0 cresc_ht neg lineto
- stroke
-} bind def
-
-/draw_crescendo % width height cons thick
-{
- setlinewidth
- /cresc_cont exch def
- /cresc_ht exch def
- /cresc_wd exch def
-
- 0 cresc_cont moveto
- cresc_wd cresc_ht lineto
- stroke
- 0 cresc_cont neg moveto
- cresc_wd cresc_ht neg lineto
- stroke
-} bind def
-
-/lily_distance
-{
- 1 copy mul exch 1 copy mul add sqrt
-} bind def
-
-/draw_tuplet % height gap dx dy thick dir
-{
-% urg: the only Level-2 PS, check effect in print
-% true setstrokeadjust
- /dir exch def
- setlinewidth
- 1 setlinecap
- 1 setlinejoin
- /tuplet_dy exch def
- /tuplet_dx exch def
- /tuplet_gapx exch def
- /tuplet_h exch def
- tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def
-
-
- 0 0 moveto
- 0 tuplet_h dir mul lineto
- tuplet_dx tuplet_gapx sub 2 div
- tuplet_dy tuplet_gapy sub 2 div tuplet_h dir mul add lineto
- tuplet_dx tuplet_gapx add 2 div
- tuplet_dy tuplet_gapy add 2 div tuplet_h dir mul add moveto
- tuplet_dx tuplet_dy tuplet_h dir mul add lineto
- tuplet_dx tuplet_dy lineto
- stroke
-} bind def
-
-/draw_volta % h w thick vert_start vert_end
-{
- /vert_end exch def
- /vert_start exch def
- setlinewidth
- /volta_w exch def
- /volta_h exch def
-% urg: the only Level-2 PS, check effect in print
-% true setstrokeadjust
- 1 setlinecap
- 1 setlinejoin
- vert_start 0 eq {
- 0 0 moveto
- 0 volta_h lineto
- } if
- 0 volta_h moveto
- volta_w volta_h lineto
- vert_end 0 eq {
- volta_w 0 lineto
- } if
- stroke
-} bind def
-
-% this is for drawing slurs.
-/draw_bezier_sandwich % thickness
-{
- setlinewidth
- moveto
- curveto
- lineto
- curveto
- gsave
- fill
- grestore
- stroke
-} bind def
-
-/draw_dashed_slur
-{
- 1 setlinecap
- 1 setlinejoin
- setdash
- setlinewidth
- 8 -2 roll
- moveto
- curveto
- stroke
-} bind def
-
-
-
-/bracket_traject
-{
- /traject_ds exch def
- /traject_alpha exch def
- traject_ds traject_alpha sin mul add
- exch
- traject_ds traject_alpha cos mul add
- exch
-} bind def
-
-
-
-/half_bracket
-{
-%6
- 0 0
-%5a
- bracket_b bracket_v add bracket_h bracket_t sub bracket_u add
- bracket_alpha bracket_v -0.15 mul bracket_traject
-%5b
- 1 bracket_h
- 0 bracket_v 0.5 mul bracket_traject
-%5c
- 0 bracket_h
-%4a
- bracket_b bracket_h bracket_t sub
- 0 bracket_v 0.4 mul bracket_traject
-%4b
- bracket_b bracket_v add bracket_h bracket_t sub bracket_u add
- bracket_alpha bracket_v -0.25 mul bracket_traject
-%4c
- bracket_b bracket_v add bracket_h bracket_t sub bracket_u add
-%3
- bracket_b bracket_h bracket_t sub
-%2
- bracket_b 0
-%1
- 0 0
-} bind def
-
-/draw_half_bracket {
- moveto
- lineto
- lineto
- curveto
- curveto
- lineto
- gsave
- fill
- grestore
-} bind def
-
-/draw_bracket % height
-{
- 2 div bracket_b add /bracket_h exch def
- bracket_t setlinewidth
-% urg: the only Level-2 PS, check effect in print
-% true setstrokeadjust
- 1 setlinecap
- 1 setlinejoin
- half_bracket
- 20 copy
- 1 -1 scale
- draw_half_bracket
- stroke
- 1 -1 scale
-% ugh, ugh:
- 0.05 0 translate
- draw_half_bracket
- stroke
-} bind def
-
+%!PS-Adobe-1.0: lily.ps
+%
+% 2 setlanguagelevel % hmm. auto_resize_dicts doesn't help either.
+% round cappings
+1 setlinecap
+%
+%
+/draw_beam % width slope thick
+{
+ 2 div /beam_thick exch def
+ /beam_slope exch def
+ /beam_wd exch def
+ beam_slope beam_wd mul /beam_ht exch def
+ 0 beam_thick neg moveto
+ beam_wd beam_ht rlineto
+ 0 beam_thick 2 mul rlineto
+ 0 beam_thick lineto
+ closepath fill
+} bind def
+%
+/draw_decrescendo % width height cons thick
+{
+ setlinewidth
+ /cresc_cont exch def
+ /cresc_ht exch def
+ /cresc_wd exch def
+%
+ cresc_wd cresc_cont moveto
+ 0 cresc_ht lineto
+ stroke
+ cresc_wd cresc_cont neg moveto
+ 0 cresc_ht neg lineto
+ stroke
+} bind def
+%
+/draw_crescendo % width height cons thick
+{
+ setlinewidth
+ /cresc_cont exch def
+ /cresc_ht exch def
+ /cresc_wd exch def
+%
+ 0 cresc_cont moveto
+ cresc_wd cresc_ht lineto
+ stroke
+ 0 cresc_cont neg moveto
+ cresc_wd cresc_ht neg lineto
+ stroke
+} bind def
+%
+/lily_distance
+{
+ 1 copy mul exch 1 copy mul add sqrt
+} bind def
+%
+/draw_tuplet % height gap dx dy thick dir
+{
+% urg: the only Level-2 PS, check effect in print
+% true setstrokeadjust
+ /dir exch def
+ setlinewidth
+ 1 setlinecap
+ 1 setlinejoin
+ /tuplet_dy exch def
+ /tuplet_dx exch def
+ /tuplet_gapx exch def
+ /tuplet_h exch def
+ tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def
+%
+%
+ 0 0 moveto
+ 0 tuplet_h dir mul lineto
+ tuplet_dx tuplet_gapx sub 2 div
+ tuplet_dy tuplet_gapy sub 2 div tuplet_h dir mul add lineto
+ tuplet_dx tuplet_gapx add 2 div
+ tuplet_dy tuplet_gapy add 2 div tuplet_h dir mul add moveto
+ tuplet_dx tuplet_dy tuplet_h dir mul add lineto
+ tuplet_dx tuplet_dy lineto
+ stroke
+} bind def
+%
+/draw_volta % h w thick vert_start vert_end
+{
+ /vert_end exch def
+ /vert_start exch def
+ setlinewidth
+ /volta_w exch def
+ /volta_h exch def
+% urg: the only Level-2 PS, check effect in print
+% true setstrokeadjust
+ 1 setlinecap
+ 1 setlinejoin
+ vert_start 0 eq {
+ 0 0 moveto
+ 0 volta_h lineto
+ } if
+ 0 volta_h moveto
+ volta_w volta_h lineto
+ vert_end 0 eq {
+ volta_w 0 lineto
+ } if
+ stroke
+} bind def
+%
+% this is for drawing slurs.
+/draw_bezier_sandwich % thickness
+{
+ setlinewidth
+ moveto
+ curveto
+ lineto
+ curveto
+ gsave
+ fill
+ grestore
+ stroke
+} bind def
+%
+/draw_dashed_slur
+{
+ 1 setlinecap
+ 1 setlinejoin
+ setdash
+ setlinewidth
+ 8 -2 roll
+ moveto
+ curveto
+ stroke
+} bind def
+%
+%
+%
+/bracket_traject
+{
+ /traject_ds exch def
+ /traject_alpha exch def
+ traject_ds traject_alpha sin mul add
+ exch
+ traject_ds traject_alpha cos mul add
+ exch
+} bind def
+%
+%
+%
+/half_bracket
+{
+%6
+ 0 0
+%5a
+ bracket_b bracket_v add bracket_h bracket_t sub bracket_u add
+ bracket_alpha bracket_v -0.15 mul bracket_traject
+%5b
+ 1 bracket_h
+ 0 bracket_v 0.5 mul bracket_traject
+%5c
+ 0 bracket_h
+%4a
+ bracket_b bracket_h bracket_t sub
+ 0 bracket_v 0.4 mul bracket_traject
+%4b
+ bracket_b bracket_v add bracket_h bracket_t sub bracket_u add
+ bracket_alpha bracket_v -0.25 mul bracket_traject
+%4c
+ bracket_b bracket_v add bracket_h bracket_t sub bracket_u add
+%3
+ bracket_b bracket_h bracket_t sub
+%2
+ bracket_b 0
+%1
+ 0 0
+} bind def
+%
+/draw_half_bracket {
+ moveto
+ lineto
+ lineto
+ curveto
+ curveto
+ lineto
+ gsave
+ fill
+ grestore
+} bind def
+%
+/draw_bracket % height
+{
+ 2 div bracket_b add /bracket_h exch def
+ bracket_t setlinewidth
+% urg: the only Level-2 PS, check effect in print
+% true setstrokeadjust
+ 1 setlinecap
+ 1 setlinejoin
+ half_bracket
+ 20 copy
+ 1 -1 scale
+ draw_half_bracket
+ stroke
+ 1 -1 scale
+% ugh, ugh:
+ 0.05 0 translate
+ draw_half_bracket
+ stroke
+} bind def
+%
(define (header-end)
(string-append
"\\special{! "
- (regexp-substitute/global #f "\n" (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
+ (ly-gulp-file "lily.ps")
+ ;; breaks on ppc
+;; (regexp-substitute/global #f "\n" (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
"}"
"\\input lilyponddefs \\turnOnPostScript"))
--- /dev/null
+pl 80
+ - use mgsmerge iso tupdate
+
+pl 79
+ - empty sed script fix for aix
+
+pl 78
+ - yodl mode, mp fixes
+
+pl 77
+ - mfmode
+
+pl 76
+ - bfs: shells, scripts
+
+pl 75
+ - bfs: release
+
+pl 74
+ - avoid buggy /bin/sh on hp-ux
+ - bf: make/stepmake.make
+ - simple prolog support
+
+pl 73
+ - bf: invoke sed only once
+
+pl 72
+ - bf: mfplain dependency
+ - inimf, inimf checking (sigh)
+
+pl 71
+ - bf: c-tags
+ - yodl: groff, ditroff
+
+pl 70
+ - GUILE config fixes (AF)
+
+pl 69
+ - package_depth detection fix
+
+pl 68
+ - support for install-libraries
+
+pl 66
+ - check for tbl and gmake
+
+pl 65
+ - unix style pathsep/dirsep for cygwin
+
+pl 64
+ - gcc-2.8/egcs
+
+pl 63
+ - CFLAGS from yodl debian patch
+
+pl 62
+ - fixed dist from subdirs
+ - junked stepmake/aclocal.m4 (again?)
+ - resurrected po stuff
+
+pl 61
+ - bf: package-diff
+
+pl 60
+ - small fixes.
+
+pl 59
+ - bf: package-diff (remove missing automatic)
+ - install templates, (urg) INSTALL*1,2 INSTALL_OUT*1,2
+
+pl 58
+ - distribute formatted txt files: no yodl needed for operation!
+ - guile 1.2 and 1.3 support
+
+pl 57
+ - yodl first build script fixes
+ - uninstall fixes, but, urg, still have to uninstall twice
+ to get rid of all subdirs
+ - installed stepmake
+ * install not required
+ * only installs on explicit make install from toplevel stepdir
+ * rather urg, 'make dist' needs absolute distdir!
+
+pl 56
+ - crude metapost stuff
+
+pl 55
+ - table-to-html stuff moved .
+
+pl 54
+ - && for TeX
+
+pl 53
+ - moved TeX stuff into tex template
+
+pl 52
+ - striproff
+ - reeable $(PACKAGE)_LIBES,_INCLUDES
+ - metafont rules
+ - GTK+, --, -draw config stuff
+
+pl 51
+ - bumped version nr
+
+pl 50
+ - bf's: PATHSEP
+ - png
+
+pl 49
+ - use yodl2ms and striproff for txt conversion
+ - bf: chmod fail
+
+pl 48
+ - bumped version for yodl after various (lily pl7) changes
+
+pl 47
+ - bf: patch in website after 'make release'
+ - windows ln -> cp
+ - bf: texinfo build
+
+pl 46
+ - bf: versioning typo: topleveL_MAJOR
+ - bf: reincluded optional STATE-VECTOR
+pl 45
+ - Foo_rules.make -> foo-rules.make
+
+pl 44
+ - split: Toplevel.make, debian/Makefile, Documentation/topdocs/Makefile
+
+pl 43
+ - grand split up in targets/rules/variables. The vars should be before rules!!
+pl 42
+ - fake-msgfmt.sh; urg copied from fake-yodl
+
+pl 41
+ - standard naming: _FILES
+ - use install-sh
+ - junked most check-X-deps
+ - standard naming: dir/out/library.a
+ - split C++ / C stuff in separate files. Moved out of default stuff
+ - automake.yo updates
+ - fake-yodl.sh
+
+pl 40
+ - bf's: texinfo
+ - bf's: package-zip.sh for bash-2.0
+ - typo package-diff
+
+pl 39
+ - disabled toplevel index
+
+pl 38
+ - bf's: topweb, Documentation
+ - bf: ls-latex
+
+pl 37
+ - bf's: add-html-footer (ok, i've been reading /.)
+
+pl 36.hwn1
+ - Metafont.make
+ - use := assignment for shell & wildcard stuff
+
+pl 36
+ - bf: Executable.make install
+
+pl 35
+ - bf: Po_rules
+ - grand foreach hack (HWN)
+
+pl 34
+ - stepmake/*shared.make
+
+pl 33
+ - make dist fix
+ - yodl/lily website fixes
+
+pl 32
+ - DEPTH: enable fixing of 'yodl using yodl'
+ - bf's: package-diff: --dir-*
+
+pl 31.hwn1
+ - bf ls-latex.py; added format
+
+pl 31
+ - fixed make-flags
+ - fixup package-diff and added to-dir, from-dir
+
+pl 30.hwn2
+ -
+
+pl 30.hwn1
+ - doc++ target
+ - make -> $(MAKE)
+
+pl 30
+ - add-html-footer: html/body/title
+
+pl 29.hwn1
+ - automake.urgh -> automake.yo
+
+pl 29
+ - counter fix
+
+pl 28
+ - mini fix voor soladeris (HWN)
+ - add-html-footer fixes
+ - dropped pl
+
+pl 27
+ - irix fixes(?) (HWN)
+
+pl 26.jcn3
+ - update.py: try at stupid advice
+ - bf: ls-latex .yo author
+ - bf: Excutable.make install
+
+pl 26.jcn2
+ - no changes
+
+pl 26.hwn1
+ - no changes; just testin' make update
+
+pl 26.jcn1
+ - no changes
+
+pl 26
+ - make apply
+ - package-to.diff.gz
+ - package-from-to.diff.gz with state-vector
+ - state vector
+
+pl 25
+ - bf: add-html-footer.py: version_str iso tuple
+ - typo: Executable.make
+ - for 2latex: yodl2latex of yodl-1.30.0.pre9
+ - package depth 'detected' by configure (kinda ugh)
+ - fixes (HWN)
+
+pl 24
+ - binary releases:
+ * make deb
+ * dpkg 1.4.0.23.2
+ * debhelper 0.96
+ * /usr/bin/db_*: remove -p from install options (urg)
+ * make rpm
+ * make zip
+ - debian fixes
+ - SEXECUTABLES / EXECUTABLES (JBR)
+ - fixed package-zip.sh (again?)
+ - bf's: make zip
+ - some doco
+ - bf: STRIPFILES
+ - rpm from tarball in $(depth)/$(outdir)
+ - dropped lilypython, pythonblurb
+ - bf's: flower.py/packagepython.py/package-diff.py
+
+
+pl 23.hwn2
+ - add mailaddress to package-diff, beautifications
+
+pl 23.hwn1
+ - release.py: check make dist retval
+ - revamped rpm stuff.
+ - bf abs-step-bindir
+
+
+pl 23
+ - relaxed 'error' to '-echo' for non-vital utilities
+ - table-to-html.py
+ - bin/stepdirs.sh
+ - bin/stepmakeise.sh
+ - --package-ised
+ - windows-nt fixes (JBR)
+
+pl 22
+ - new zip stuff
+
+pl 21
+ - packagepythonified add-html-footer, ls-latex
+ - packagepython (dankje lieverd)
+ - LD
+ - bf: don't diff .pyc
+ - yodl2 -> YODL2
+ - AC_STEPMAKE_YODL
+ - vars: GCC/TROFF/LD
+
+pl 20
+ - bf: ls-latex: .yo author + title
+ - htmldoc fix
+ - ls-latex
+ - add-html-footer
+ - po stuff
+ - latex + bibtex
+ - latex2yodl fixes
+
+pl 19
+ - add htmlfooter to all yodl chapter files
+ - .latex for latex files
+ - tex2html -> latex2html.sh
+
+pl 18
+ - package-zet.sh
+ - cleaned-out configure -> aclocal.m4
+ - (step)make targets:
+ * diff
+ * help
+ * rpm
+ * zip
+ - tex2yodl.pl helper
+ - patches are now called $package-$TOPLEVEL_VERSION.diff
+ - fixed @FILE@ and @VAR@ substitute
+ - bf: DO_CXX_COMPILE
+
+pl 17
+ - C rules :-)
+ - bf's Template.make
+
+pl 16
+ - more lily macros -> generic stepmake
+ - dropped POD configuration
+ - used it
+ - pod2yodl: one time conversion helper
+
+pl 15
+ - fixes: texi2man
+
+pl 14
+ - text2html
+
+pl 13
+ - texinfo support
+ - removed mudela rules
+
+pl 12
+ - irix patch
+
+pl 11
+ - 'urg comment' by wendy
+ - python fixes
+
+pl 10
+ - more from lily
+ - sed-stuff
+
+pl 9
+ - configure fix for irix tr
+ - bf: Install_*.make
+ - bf: PACKAGE_ ROOTDIR
+
+pl 8
+ - some python stuff from lily
+
+pl 7
+ - PACKAGE_NAME
+ - BLURB
+ - INSTALL doco
+ - Documentation/
+
+pl 6
+ - bf: include makedir/Rules.make too
+ - Documentation/automake.urgh
+
+pl 5
+ - allow chained make-dist
+
+pl 4
+ - DOTTEXT->.txt
+
+pl 3
+ - included more Lily makefiles
+
+pl 2
+ - dropped $(package) in makefile names
+ - moved stepmake makes to stepmake/
+
+pl 1
+ - preparing for verbatim include
+
+pl 0
+ - shared between lilypond-0.1.69 lilyx-0.1.0
#!@PYTHON@
"""
-Print a nice footer. add the top of the NEWS file (up to the ********)
+Print a nice footer. add the top of the ChangeLog file (up to the ********)
"""
program_name = 'add-html-footer'
import __main__
fullname = "unknown"
-news_file = ''
+changelog_file = ''
index_file=''
banner_file = ''
-news_file=''
-news =''
+changelog_file=''
+changes =''
footer = '\n<hr>Please take me <a href=%s>back to the index</a>\n\
of %s<!%s%s>\n'
builtstr = '\n<hr><font size=-1>\n\
This page was built from %s-%s by\
<address><br>%s <<a href=mailto:%s>%s</a>>, at %s.</address><p></font>'
-(options, files) = getopt.getopt(sys.argv[1:], 'hp:', ['help', 'news=', 'index=', 'package='])
-
-def gulp_file (fn):
- f = open (fn)
- return f.read ()
+(options, files) = getopt.getopt(sys.argv[1:], 'c:hp:', ['changelog=', 'help', 'news=', 'index=', 'package='])
+
+def gulp_file(f):
+ try:
+ i = open(f)
+ i.seek (0, 2)
+ n = i.tell ()
+ i.seek (0,0)
+ except:
+ sys.stderr.write ("can't open file: %s\n" % f)
+ return ''
+ s = i.read (n)
+ if len (s) <= 0:
+ sys.stderr.write ("gulped emty file: %s\n" % f)
+ i.close ()
+ return s
def help ():
sys.stdout.write (r"""Usage: add-html-footer [OPTION]... HTML-FILE
-Add a nice footer, add the top of the NEWS file (up to the ********)
+Add a nice footer, add the top of the ChangLog file (up to the ********)
Options:
-h, --help print this help
-p, --package package name (ugh. Junkme.)
for opt in options:
o = opt[0]
a = opt[1]
- if o == '--news':
- news_file = a
+ if o == '--news' or o == '--changelog' or o == '-c':
+ changelog_file = a
elif o == '--index':
index_file = a
elif o == '-h' or o == '--help':
banner_id = '<! banner_id >'
-if news_file:
- news = gulp_file (news_file)
- i = regex.search ('^\*\*', news)
- news = news[:i]
+if changelog_file:
+ changes = gulp_file (changelog_file)
+ i = regex.search ('^\*\*', changes)
+ changes = changes[:i]
def check_tag (tag, sub, s, bottom):
tag = string.lower (tag)
for f in files:
s = gulp_file (f)
- if news_file:
- s = regsub.sub ('top_of_NEWS', '<XMP>\n'+ news + '\n</XMP>\n', s)
+ if changelog_file:
+ s = regsub.sub ('top_of_ChangeLog', '<XMP>\n'+ changes + '\n</XMP>\n', s)
s = check_tag ('<body', '', s, 0)
if regex.search ('<BODY', s) == -1:
import __main__
import glob
-import regex
-latex_author_re = regex.compile(r'\\author{\([^}]+\)}')
-latex_title_re = regex.compile(r'\\title{\([^}]+\)}')
+import re
class Latex_head:
def __init__ (self):
def read_latex_header (fn):
s = gulp_file (fn)
- i = regex.search( '\\\\begin{document}', s)
-
- if i < 0:
- sys.stderr.write( 'Huh? empty file?')
- s = '\\author{(unknown)}\\title{(unknown)}'
-
- s = s[:i]
- s = regsub.gsub('%.*$', '', s)
- s = regsub.gsub('\n', ' ', s)
-
header = Latex_head()
- header.filename= fn;
+ m = re.search(r'\\author{([^}]+)}', s)
+ if m:
+ header.author = m.group (1)
- if latex_author_re.search (s) == -1 :
- sys.stderr.write( 'huh? No author?')
- header.author = 'unknown'
+ m = re.search (r'\\title{([^}]+)}',s )
+ if m:
+ header.title = m.group (1)
else:
- header.author = latex_author_re.group (1)
- if latex_title_re.search (s) == -1:
- sys.stderr.write( 'huh? No title?')
- header.title = 'unknown'
- else:
- header.title = latex_title_re.group (1)
+ header.title = 'No title'
+
header.outfile = fn
- header.outfile = regsub.gsub ('\.latex$', '.ps.gz', header.outfile)
- header.outfile = regsub.gsub ('\.tex$', '.ps.gz', header.outfile)
- header.outfile = regsub.gsub ('\.doc$', '.ps.gz', header.outfile)
+ header.outfile = re.sub ('\.latex$', '.ps.gz', header.outfile)
+ header.outfile = re.sub ('\.tex$', '.ps.gz', header.outfile)
+ header.outfile = re.sub ('\.doc$', '.ps.gz', header.outfile)
header.format = 'gzipped postscript'
return header
-bib_author_re = regex.compile('% *AUTHOR *= *\(.*\)$')
-bib_title_re = regex.compile('% *TITLE *= *\(.*\)$')
-
def bib_header (fn):
s = gulp_file (fn)
- if bib_author_re.search (s) == -1 :
- sys.stderr.write ('gulped file: ' + fn + '\n')
- raise 'huh?'
+ m = re.search ('% *AUTHOR *= *(.*)$',s)
+ header = Latex_head()
+ if m:
+ header.author = m.group (1)
- header = Latex_head()
- header.filename= fn;
- header.author = bib_author_re.group (1)
- if bib_title_re.search (s) == -1:
- sys.stderr.write ('gulped file: ' + fn + '\n')
- raise 'huh?'
- header.title = bib_title_re.group (1)
- header.outfile = regsub.gsub ( '\.bib$', '.html' , fn)
+
+ m = re.search ('% *TITLE *= *(.*)$',s )
+ if m:
+ header.title = m.group (1)
+ else:
+ header.title = '(bibliography without title)'
+
+ header.outfile = re.sub ( '\.bib$', '.html' , fn)
header.format = 'HTML'
return header
def read_pod_header (fn):
header = Latex_head ()
s = gulp_file (fn)
- i = regex.search( '[^\n \t]', s)
+ i = re.search( '[^\n \t]', s)
s = s[i:]
- i = regex.search( '\n\n', s)
+ i = re.search( '\n\n', s)
s = s[i+2:]
if i < 0:
sys.stderr.write ('gulped file: ' + fn + '\n')
raise 'huh?'
- i = regex.search( '\n\n', s)
+ i = re.search( '\n\n', s)
header.title = s[:i]
header.filename = fn
- header.outfile = regsub.gsub ('\.pod$', '.html', fn)
+ header.outfile = re.sub ('\.pod$', '.html', fn)
return header
def read_texinfo_header (fn):
header = Latex_head ()
s = gulp_file (fn)
- i = regex.search( '@node ', s)
- s = s[i+5:]
- i = regex.search( ',', s)
- if i < 0:
- sys.stderr.write ('gulped file: ' + fn + '\n')
- raise 'huh?'
- header.title = s[:i]
+ m = re.search( '@settitle (.*$)', s)
+ if m:
+ header.title = m.group (1)
header.filename = fn
- header.outfile = regsub.gsub ('\.texinfo$', '.html', fn)
+ header.outfile = re.sub ('\.tely', '.html', fn)
header.format = 'HTML'
- return header
+ return header
def read_tely_header (fn):
header = Latex_head ()
s = gulp_file (fn)
- i = regex.search( '@settitle', s)
- s = s[i+10:]
- i = regex.search( '\n', s)
- if i < 0:
- sys.stderr.write ('gulped file: ' + fn + '\n')
- raise 'huh?'
- header.title = s[:i]
+ m = re.search( '@settitle (.*$)', s)
+ if m:
+ header.title = m.group (1)
header.filename = fn
- header.outfile = regsub.gsub ('\.tely', '.html', fn)
+ header.outfile = re.sub ('\.tely', '.html', fn)
header.format = 'HTML'
- return header
-
-# urg
-# should make a 'next_parens'
-yo_article_re = regex.compile('article(\\([^)]*\\))[ \t\n]*(\\([^)]*\\))')
-yo_report_re = regex.compile('report(\\([^)]*\\))[\t\n ]*(\\([^)]*\\))')
-yo_sect_re = regex.compile('sect(\\([^)]*\\))')
-yo_chap_re = regex.compile('sect(\\([^)]*\\))')
+ return header
-def read_yo_header (fn):
- header = Latex_head ()
- s = gulp_file (fn)
- if 0:
- pass
- elif yo_report_re.search (s) <> -1:
- header.author = yo_report_re.group(2)
- header.title = yo_report_re.group(1)
- elif yo_article_re.search (s) <> -1:
- header.author = yo_article_re.group(2)
- header.title = yo_article_re.group(1)
- elif yo_chap_re.search (s) <> -1:
- header.title = yo_chap_re.group (1)
- elif yo_sect_re.search (s) <> -1:
- header.title = yo_sect_re.group (1)
- header.filename = fn
- header.outfile = regsub.gsub ('\.yo$', '.html', fn)
- header.format = 'HTML'
- return header
def print_html_head (l,o,h):
pre =o
"Generate html index file for FILE...\n\n"
+ "Options:\n"
+ " -h, --help print this help\n"
- + " -p, --package=DIR specify package\n"
)
sys.exit (0)
import getopt
(options, files) = getopt.getopt(sys.argv[1:],
- 'e:hp:', ['help', 'prefix=', 'package=', 'title='])
+ 'e:h', ['help', 'prefix=', 'title='])
tex = ''
output =''
title = a
elif o == '-h' or o == '--help':
help ()
- elif o == '-p' or o == '--package':
- topdir = a
-sys.path.append (topdir + '/stepmake/bin')
-from packagepython import *
-package = Package (topdir)
-packager = Packager ()
l = sys.stdout
for x in files:
- if regex.search ('\\.bib$', x) <> -1:
+ if re.search ('\\.bib$', x) :
head = bib_header (x)
- elif regex.search ('\\.pod$', x) <> -1:
+ elif re.search ('\\.pod$', x) :
head = read_pod_header (x)
- elif regex.search ('\\.texinfo$', x) <> -1:
+ elif re.search ('\\.texinfo$', x) :
head = read_texinfo_header (x)
- elif regex.search ('\\.tely$', x) <> -1:
+ elif re.search ('\\.tely$', x):
head = read_tely_header (x)
- elif regex.search ('\\.yo$', x) <> -1:
- head = read_yo_header (x)
else:
head = read_latex_header (x)
if head.title == '':
import getopt
import pipes
-def gulp_file (fn):
- f = open (fn)
- return f.read ()
+def gulp_file(f):
+ try:
+ i = open(f)
+ i.seek (0, 2)
+ n = i.tell ()
+ i.seek (0,0)
+ except:
+ sys.stderr.write ("can't open file: %s\n" % f)
+ return ''
+ s = i.read (n)
+ if len (s) <= 0:
+ sys.stderr.write ("gulped emty file: %s\n" % f)
+ i.close ()
+ return s
def program_id ():
return name + ' ' + version;
(mailaddress (), program_id (), fromname, toname,
flags.package.name, os.path.basename (patch_name)))
- # write state vector
- f.write ('--state\n')
- state_vec = gulp_file ('make/STATE-VECTOR')
- from_str = version_tuple_to_str (flags.from_version)
- to_str = version_tuple_to_str (flags.to_version)
- i = regex.search (from_str, state_vec)
- if i == -1:
- f.write (from_str + '\n')
- else:
- state_vec = state_vec[i:]
- i = regex.search (to_str, state_vec)
- if i == -1:
- f.write (to_str + '\n')
- else:
- i = i + len (version_tuple_to_str (flags.to_version))
- state_vec = state_vec[:i]
- f.write (state_vec)
- f.write ('\n')
- f.write ('++state\n')
f.close ()
sys.stderr.write ('diffing to %s... ' % patch_name)
# descent order into subdirectories:
#
ifeq ($(PACKAGE),STEPMAKE)
-SUBDIRS = bin make stepmake Documentation
+SUBDIRS = bin make stepmake
else
SUBDIRS =
endif
# list of distribution files:
#
SCRIPTS = configure aclocal.m4
-README_FILES = NEWS README TODO
+README_FILES = CHANGES README TODO
README_TXT_FILES = AUTHORS.txt INSTALL.txt
-EXTRA_DIST_FILES = $(IN_FILES) VERSION $(README_FILES) $(SCRIPTS)
+EXTRA_DIST_FILES = $(IN_FILES) VERSION $(README_FILES) $(SCRIPTS) INSTALL.texi
NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
#
# bootstrap stepmake:
#
-STEPMAKE_TEMPLATES=toplevel
+STEPMAKE_TEMPLATES=toplevel texinfo
include $(depth)/make/stepmake.make
#
# descent order into subdirectories:
#
ifeq ($(PACKAGE),STEPMAKE)
-SUBDIRS = bin make stepmake Documentation
+SUBDIRS = bin make stepmake
else
SUBDIRS =
endif
# Texinfo_rules.make
-.SUFFIXES: .html .texinfo
+.SUFFIXES: .html .info .texi .texinfo
$(outdir)/%.info: $(outdir)/%.texi
makeinfo --output=$@ $<
$(YODL2HTML) -doutdir=$(outdir) --live-data=3 -o $@.in $<
$(sed-version) < $@.in > $@
rm -f $@.in
- $(PYTHON) $(step-bindir)/add-html-footer.py --package=$(topdir) --index=index.html --news=$(depth)/NEWS $@
+ $(PYTHON) $(step-bindir)/add-html-footer.py --package=$(topdir) --index=index.html --changelog=$(depth)/CHANGES $@
local-WWW:
-cp $(outdir)/*png $(outdir)/index.html $(depth) # don't fail if not making website