]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/user/lilypond.tely: Add dir entries for
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 14 Aug 2002 11:36:36 +0000 (11:36 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 14 Aug 2002 11:36:36 +0000 (11:36 +0000)
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.

15 files changed:
ChangeLog
Documentation/user/convert-ly.itexi [deleted file]
Documentation/user/converters.itely
Documentation/user/invoking.itexi
Documentation/user/lilypond.tely
Documentation/user/ly2dvi.itexi [deleted file]
Documentation/user/refman.itely
Documentation/user/tutorial.itely
lily/font-interface.cc
lily/gourlay-breaking.cc
lily/include/main.hh
lily/main.cc
lily/paper-score.cc
lily/warn.cc
scripts/ly2dvi.py

index 9dee03020209bb4770b6e8c5cf59732d289db85b..0ef0d168eebe3926475c7f89ad18afe270ffada9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,21 @@
-2002-08-14  Mats Bengtsson  <mats.bengtsson@s3.kth.se>
+2002-08-14  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-       * Documentation/user/{tutorial.itely, introduction.itely}: 
-       Small fixes.
+       * Documentation/user/lilypond.tely: Add dir entries for
+       executables.
 
-2002-08-14  Jan Nieuwenhuizen  <janneke@gnu.org>
+       * 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.
        * GNUmakefile.in: Add python link to build-datadir.  Fixes
        generation of midi2ly man page.
 
+2002-08-14  Mats Bengtsson  <mats.bengtsson@s3.kth.se>
+
+       * Documentation/user/{tutorial.itely, introduction.itely}: 
+       Small fixes.
+
 2002-08-13  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * 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 (file)
index 6d29691..0000000
+++ /dev/null
@@ -1 +0,0 @@
-@c -*-texinfo-*-
index a7cca30d2f2338d292d6adae1d6d2f6b1c047108..e90037f7d2a426cea73f6eb968af17988f9c7024 100644 (file)
@@ -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
index 0907ed4a2f256fe17dadc9d4e880fb60686f2e07..92c1580d0c3022bb546fa50bfb058c60cae69d5e 100644 (file)
@@ -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
index 44fc09c7f345180566e7ea80742afd171c9c3953..1cac9b75eb4e926307ed72d0306058e51970dd53 100644 (file)
@@ -6,13 +6,26 @@
 <!--- @@WEB-TITLE@@=User Manual --->
 @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 (file)
index 8b7ebf8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-@c -*-texinfo-*-
-
index 1e80a15f8e81fed6be8085f4a7fbc0e3b36d196a..20f2dd6b06ffdf1cf00db4dacef7b8524287679e 100644 (file)
@@ -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
index 81c624b72b0e9813a09a76ffb43c7a2183f30835..5a45a47c393fa82ecd89ed414244630b035ac8b3 100644 (file)
@@ -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
index 74e8ac1b35af40b133e658677fec3a2724972941..417581fc3a6941030b285bc874dffb768786124c 100644 (file)
@@ -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");
index 3120b65c6828f42002fcf994927ea9bb3dbcbd13..929f9a1bf45852611200829471e4ac7a8e520952 100644 (file)
@@ -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"));
index ff061cde45a8ff4125582bc15126650b42df6886..4d7cb1c00297b42cdc5ce29ff0f37087038f946d 100644 (file)
@@ -20,6 +20,8 @@ String find_file (String);
 void call_constructors ();
 extern Array<String> get_inclusion_names ();
 extern void set_inclusion_names (Array<String>);
+
+/* FIXME: in warn.cc */
 void progress_indication (String);
 
 /* options */
index a53db5bc9883a494f590191e0241bfdc201c0330..1f992b0039bdff3365217f855430051767e8e438 100644 (file)
@@ -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 ());
index 0e68e231713e4180aaa446f5e08140a4318b0786..fc0c5933b549c266dbc6d1315543b952f4eaa279 100644 (file)
@@ -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 ());
+    }
 }
index 71b81ec1a3eb22e109915b8ab6a54a77ad4e4e20..87a14516c590f6c38f0fc50f9bfe7fea844a7af1 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdio.h>
 
 #include "string.hh"
+#include "main.hh"
 
 void
 progress_indication (String s)
index 8b38de76072c23af26ec6b9c702c5e55b73391a6..f2fb03b5abf354a3f2f68d9db5f68c37c02f6e7e 100644 (file)
@@ -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)
-
-
-