From: Jan Nieuwenhuizen Date: Wed, 14 Aug 2002 11:36:36 +0000 (+0000) Subject: * Documentation/user/lilypond.tely: Add dir entries for X-Git-Tag: release/1.5.73~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d182d030b396d66a84efa13d947fbbdfb7240874;p=lilypond.git * Documentation/user/lilypond.tely: Add dir entries for executables. * Documentation/user/converters.itely: * Documentation/user/invoking.itexi: Fix `invocation' node names, in line with standard dir entries. * Documentation/user/convert-ly.itexi * Documentation/user/ly2dvi.itexi: Remove. * scripts/ly2dvi.py: Add pseudo-filter (and stdout output) support. * lily/main.c: * lily/paper-score.cc : * lily/gourlay-breaking.cc: Write info to stderr. --- diff --git a/ChangeLog b/ChangeLog index 9dee030202..0ef0d168ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,21 @@ -2002-08-14 Mats Bengtsson +2002-08-14 Jan Nieuwenhuizen - * Documentation/user/{tutorial.itely, introduction.itely}: - Small fixes. + * Documentation/user/lilypond.tely: Add dir entries for + executables. -2002-08-14 Jan Nieuwenhuizen + * Documentation/user/converters.itely: + * Documentation/user/invoking.itexi: Fix `invocation' node names, + in line with standard dir entries. + + * Documentation/user/convert-ly.itexi + * Documentation/user/ly2dvi.itexi: Remove. + + * scripts/ly2dvi.py: Add pseudo-filter (and stdout output) + support. + + * lily/main.c: + * lily/paper-score.cc : + * lily/gourlay-breaking.cc: Write info to stderr. * buildscripts/help2man.pl: Update to latest version from Debian. Fixes generation of man pages with perl 5.6.1. @@ -11,6 +23,11 @@ * GNUmakefile.in: Add python link to build-datadir. Fixes generation of midi2ly man page. +2002-08-14 Mats Bengtsson + + * Documentation/user/{tutorial.itely, introduction.itely}: + Small fixes. + 2002-08-13 Jan Nieuwenhuizen * lily/beam.cc (least_squares): Add comment. @@ -70,7 +87,7 @@ (arbitrary guess). (beamed-lengths): Standard length for all beams. (beamed-minimum-free-lengths): -o (beamed-extreme-minimum-free-lengths): New property. + (beamed-extreme-minimum-free-lengths): New property. * input/regression/beam-default-lengths.ly: * input/regression/beam-shortened-lengths.ly: New file. diff --git a/Documentation/user/convert-ly.itexi b/Documentation/user/convert-ly.itexi deleted file mode 100644 index 6d296919c7..0000000000 --- a/Documentation/user/convert-ly.itexi +++ /dev/null @@ -1 +0,0 @@ -@c -*-texinfo-*- diff --git a/Documentation/user/converters.itely b/Documentation/user/converters.itely index a7cca30d2f..e90037f7d2 100644 --- a/Documentation/user/converters.itely +++ b/Documentation/user/converters.itely @@ -4,18 +4,18 @@ @chapter Converting from other formats @menu -* Older LilyPond versions:: -* Importing MIDI:: -* Importing Finale :: Upgrading from older -* Importing ABC:: -* Importing PMX:: -* Importing Musedata :: -* Importing MUP:: +* Invoking convert-ly:: Older LilyPond versions. +* Invoking midi2ly:: Importing MIDI. +* Invoking etf2ly:: Importing Finale. +* Invoking abc2ly:: Importing ABC. +* Invoking pmx2ly:: Importing PMX. +* Invoking musedata2ly:: Importing Musedata. +* Invoking mup2ly:: Importing MUP. @end menu -@node Older LilyPond versions -@section Older LilyPond versions +@node Invoking convert-ly +@section Invoking convert-ly Convert-ly sequentially applies different conversions to upgrade a Lilypond input file. It uses @code{\version} statements in the file to @@ -61,8 +61,8 @@ The following options can be given: Not all language changes are handled. Only one output options can be specified. -@node Importing MIDI -@section Importing MIDI +@node Invoking midi2ly +@section Invoking midi2ly @cindex MIDI @@ -124,8 +124,8 @@ sets number @end table -@node Importing Finale -@section Importing Finale +@node Invoking etf2ly +@section Invoking etf2ly @cindex ETF @cindex enigma @@ -158,8 +158,8 @@ The list of articulation scripts is incomplete. Empty measures confuse etf2ly. -@node Importing ABC -@section Importing ABC +@node Invoking abc2ly +@section Invoking abc2ly @cindex ABC @@ -214,8 +214,8 @@ not. abc2ly ignores the ABC beaming. -@node Importing PMX -@section Importing PMX +@node Invoking pmx2ly +@section Invoking pmx2ly PMX is a MusiXTeX preprocessor written by Don Simons. More information on PMX is available from the following site: @@ -247,8 +247,8 @@ version information @end table -@node Importing Musedata -@section Importing Musedata +@node Invoking musedata2ly +@section Invoking musedata2ly @cindex Musedata @cindex CCARH @@ -282,8 +282,8 @@ version information musedata2ly converts only a small subset musedata. -@node Importing MUP -@section Importing MUP +@node Invoking mup2ly +@section Invoking mup2ly MUP (Music Publisher) is a shareware music notation program by Arkkra Enterprises. It is also the name of the input format. Mup2ly will diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index 0907ed4a2f..92c1580d0c 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -3,9 +3,9 @@ @chapter Invoking LilyPond @menu -* Reporting bugs:: -* Website:: -* Titling LilyPond scores:: +* Reporting bugs:: +* Website:: +* Invoking ly2dvi:: Titling LilyPond scores. @end menu @cindex Invoking LilyPond @@ -20,7 +20,6 @@ Usage: @end example - When invoked with a filename that has no extension, LilyPond will try to add @file{.ly} as an extension first. To have LilyPond read from stdin, use a dash @code{-} for @var{file}. @@ -226,20 +225,19 @@ website contains updates to the manual. You can find the lilypond website at @uref{http://www.lilypond.org/}. -@node Titling LilyPond scores -@section Titling LilyPond scores +@node Invoking ly2dvi +@section Invoking ly2dvi Nicely titled output is created through a separate program: @file{ly2dvi} is a script that uses LilyPond and La@TeX{} to create a nicely titled piece of sheet music, in DVI format or PostScript. -@subsection Invoking ly2dvi - -@c ly2dvi needs at least one FILE, can't act as filter yet @example ly2dvi [@var{option}]@dots{} @var{file}@dots{} @end example +To have ly2dvi read from stdin, use a dash @code{-} for @var{file}. + Ly2dvi supports the following options: @table @code diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index 44fc09c7f3..1cac9b75eb 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -6,13 +6,26 @@ @end html +@ignore +Distributions will want to install lilypond.info doing: + ./install-info --info-dir=/usr/share/info out/lilypond.info + +@end ignore @dircategory GNU music project @direntry @c ;; prepend GNU for dir, must be unique -* GNU LilyPond: (lilypond). The GNU music typesetter. -@c * install-info: (texinfo)Invoking install-info. Update info/dir entries. -@c * texi2dvi: (texinfo)Format with texi2dvi. Print Texinfo documents. +* GNU LilyPond: (lilypond). The GNU music typesetter. +* ly2dvi: (lilypond)Invoking ly2dvi:: Titling LilyPond scores. +* convert-ly: (lilypond)Invoking convert-ly:: + Older LilyPond versions. +* midi2ly: (lilypond)Invoking midi2ly:: Importing MIDI. +* etf2ly: (lilypond)Invoking etf2ly:: Importing Finale. +* abc2ly: (lilypond)Invoking abc2ly:: Importing ABC. +* pmx2ly: (lilypond)Invoking pmx2ly:: Importing PMX. +* musedata2ly: (lilypond)Invoking musedata2ly:: + Importing Musedata. +* mup2ly: (lilypond)Invoking mup2ly:: Importing MUP. @end direntry @@ -98,7 +111,6 @@ this and other documentation. @mbinclude refman.itely @mbinclude internals.itely @mbinclude invoking.itexi -@mbinclude ly2dvi.itexi @mbinclude lilypond-book.itely @mbinclude converters.itely @mbinclude literature.itely diff --git a/Documentation/user/ly2dvi.itexi b/Documentation/user/ly2dvi.itexi deleted file mode 100644 index 8b7ebf8441..0000000000 --- a/Documentation/user/ly2dvi.itexi +++ /dev/null @@ -1,2 +0,0 @@ -@c -*-texinfo-*- - diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 1e80a15f8e..20f2dd6b06 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -511,7 +511,7 @@ rewritten from scratch and supports LilyPond export as of version Another option is to enter the music using your favorite MIDI sequencer, and then import it using midi2ly. midi2ly is described in -@ref{Importing MIDI}. +@ref{Invoking midi2ly}. @c . {Relative} @node Relative octaves diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 81c624b72b..5a45a47c39 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -1738,9 +1738,8 @@ occasionally, details of the syntax are changed. This fragment indicates for which version the input file was written. When you compile this file, the version number will be checked, and you will get a warning when the file is too old. This version number is also -used by the @code{convert-ly} program (See @ref{Older -LilyPond versions}), which is used to update the file to the latest -lily version. +used by the @code{convert-ly} program (See @ref{Invoking convert-ly}), +which is used to update the file to the latest lily version. @node A piano excerpt diff --git a/lily/font-interface.cc b/lily/font-interface.cc index 74e8ac1b35..417581fc3a 100644 --- a/lily/font-interface.cc +++ b/lily/font-interface.cc @@ -236,7 +236,8 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain) } warning (_ ("couldn't find any font satisfying ")); - scm_write (scm_list_n (point_str0, shape, series , family, rel_str0, SCM_UNDEFINED), scm_current_error_port ()); + scm_write (scm_list_n (point_str0, shape, series , family, rel_str0, + SCM_UNDEFINED), scm_current_error_port ()); scm_flush (scm_current_error_port ()); return scm_makfrom0str ("cmr10"); diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 3120b65c68..929f9a1bf4 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -184,7 +184,10 @@ Gourlay_breaking::do_solve () const } if (verbose_global_b) - printf ("Optimal demerits: %f\n", optimal_paths.top ().demerits_); + { + progress_indication (_f ("Optimal demerits: %f", + optimal_paths.top ().demerits_) + "\n"); + } if (optimal_paths.top ().demerits_ >= infinity_f) warning (_ ("No feasible line breaking found")); diff --git a/lily/include/main.hh b/lily/include/main.hh index ff061cde45..4d7cb1c002 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -20,6 +20,8 @@ String find_file (String); void call_constructors (); extern Array get_inclusion_names (); extern void set_inclusion_names (Array); + +/* FIXME: in warn.cc */ void progress_indication (String); /* options */ diff --git a/lily/main.cc b/lily/main.cc index a53db5bc98..1f992b0039 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -342,7 +342,7 @@ main_prog (void *, int, char **) ly_init_guile (); - printf ("\n"); + progress_indication ("\n"); call_constructors (); all_fonts_global = new All_font_metrics (global_path.string ()); diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 0e68e23171..fc0c5933b5 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -131,5 +131,8 @@ Paper_score::process () outputter_ = 0; if (verbose_global_b) - ly_display_scm (scm_gc_stats ()); + { + scm_write (scm_gc_stats (), scm_current_error_port ()); + scm_flush (scm_current_error_port ()); + } } diff --git a/lily/warn.cc b/lily/warn.cc index 71b81ec1a3..87a14516c5 100644 --- a/lily/warn.cc +++ b/lily/warn.cc @@ -9,6 +9,7 @@ #include #include "string.hh" +#include "main.hh" void progress_indication (String s) diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 8b38de7607..f2fb03b5ab 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -322,6 +322,7 @@ keep_temp_dir_p = 0 verbose_p = 0 preview_p = 0 preview_resolution = 90 +pseudo_filter_p = 0 help_summary = _ ("Generate .dvi with LaTeX for LilyPond") @@ -375,8 +376,9 @@ paper_p = 1 output_name = '' -## docme: what does this do? -targets = [ 'DVI', 'LATEX', 'MIDI', 'TEX'] +# List of output formats that ly2dvi should create +# Most advanced format first. +targets = ['DVI', 'LATEX', 'MIDI', 'TEX'] track_dependencies_p = 0 dependency_files = [] @@ -449,16 +451,19 @@ def quiet_system (cmd, name, ignore_error = 0): if not verbose_p: progress ( _("Running %s...") % name) cmd = cmd + ' 1> /dev/null 2> /dev/null' + elif pseudo_filter_p: + cmd = cmd + ' 1> /dev/null' return system (cmd, ignore_error, quiet = 1) -def run_lilypond (files, outbase, dep_prefix): +def run_lilypond (files, dep_prefix): opts = '' -# opts = opts + '--output=%s.tex' % outbase opts = opts + ' ' + string.join (map (lambda x : '-I ' + x, include_path)) + if pseudo_filter_p: + opts = opts + ' --output=lelie' if paper_p: opts = opts + ' ' + string.join (map (lambda x : '-H ' + x, fields)) @@ -559,7 +564,7 @@ def find_tex_files (files, extra): x = x + 1 if not x: fstr = string.join (files, ', ') - warning (_ ("no lilypond output found for %s") % fstr) + warning (_ ("no LilyPond output found for %s") % fstr) return tfiles def one_latex_definition (defn, first): @@ -683,6 +688,7 @@ RETURN VALUE None """ + latex_fn = outbase + '.latex' wfs = find_tex_files (files, extra) @@ -871,8 +877,8 @@ for opt in options: elif o == '--postscript' or o == '-P': targets.append ('PS') elif o == '--pdf' or o == '-p': - targets.append ('PDF') targets.append ('PS') + targets.append ('PDF') elif o == '--keep' or o == '-k': keep_temp_dir_p = 1 elif o == '--no-lily': @@ -904,6 +910,7 @@ for opt in options: sys.exit (0) +print 'hallo3' # Don't convert input files to abspath, rather prepend '.' to include # path. include_path.insert (0, '.') @@ -917,11 +924,20 @@ if files and files[0] != '-' and os.path.dirname (files[0]) != '.': include_path = map (abspath, include_path) - - +if files and (files[0] == '-' or output_name == '-'): + if len (files) == 1: + pseudo_filter_p = 1 + output_name = 'lelie' + if verbose_p: + progress (_ ("pseudo filter")) + else: + help () + user_error (_ ("pseudo filter only for single input file."), 2) + + original_output = output_name -if files and files[0] != '-': +if files: # Ugh, maybe make a setup () function files = map (lambda x: strip_extension (x, '.ly'), files) @@ -932,7 +948,7 @@ if files and files[0] != '-': (outdir, outbase) = ('','') if not output_name: outbase = os.path.basename (files[0]) - outdir = abspath('.') + outdir = abspath ('.') elif output_name[-1] == os.sep: outdir = abspath (output_name) outbase = os.path.basename (files[0]) @@ -965,7 +981,7 @@ if files and files[0] != '-': if lily_p: try: - run_lilypond (files, outbase, dep_prefix) + run_lilypond (files, dep_prefix) except: # TODO: friendly message about LilyPond setup/failing? # @@ -979,6 +995,11 @@ if files and files[0] != '-': targets = [] traceback.print_exc () + # Our LilyPond pseudo filter always outputs to 'lelie' + # have subsequent stages and use 'lelie' output. + if pseudo_filter_p: + files[0] = 'lelie' + if 'PNG' in targets and 'PS' not in targets: targets.append ('PS') if 'PS' in targets and 'DVI' not in targets: @@ -1015,8 +1036,23 @@ if files and files[0] != '-': depfile = os.path.join (outdir, outbase + '.dep') generate_dependency_file (depfile, depfile) if os.path.isfile (depfile): - progress (_ ("dependencies output to `%s'...") % depfile) + progress (_ ("dependencies output to `%s'...") % + depfile) + + if pseudo_filter_p: + main_target = 0 + for i in 'PDF', 'PS', 'PNG', 'DVI', 'LATEX': + if i in targets: + main_target = i + break + outname = outbase + '.' + string.lower (main_target) + if os.path.isfile (outname): + sys.stdout.write (open (outname).read ()) + elif verbose_p: + warning (_ ("can't find file: `%s'") % outname) + targets = [] + # Hmm, if this were a function, we could call it the except: clauses for i in targets: ext = string.lower (i) @@ -1034,9 +1070,5 @@ if files and files[0] != '-': cleanup_temp () else: - # FIXME: read from stdin when files[0] = '-' help () user_error (_ ("no files specified on command line."), 2) - - -