New to the list, question about lilypond-book

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

New to the list, question about lilypond-book

Vaylor Trucks
First of all, let me say that I am super impressed with LilyPond.  Up to
this point I have been scrimping by with a patchwork of Finale Notepad,
Cakewalk, and hand-drawn ugliness.  Discovering LilyPond has been a real
treat.

I hope this is an easy one.  I searched the archives but didn't see any
direct mention of this.  I have LilyPond running on Windows XP.  What I have
discovered is that the lilypond-book.py script seems to have some problems
with spaces in the path name.  For example.  If I have an HTML file stored
in

c:\documents and settings\vtrucks\desktop

then I get no output and simply the usage statement is returned.  This is
even if the path is enclosed in quotes.  If I move the .html I am converting
to a place where there are no spaces in the filename, then I get a little
further.  For example if I run

lilypond-book.py --output=c:\output c:\test.html

Then it seems to process everything, however the HTML file is never created
in the output directory and I get the following error:

C:\Program Files\LilyPond\usr\bin>lilypond-book.py --output=c:\output
C:\test.ht
ml
lilypond-book.py (GNU LilyPond) 2.6.4
Reading C:\test.html...
Dissecting...
Writing snippets...
Processing...
Running lilypond...GNU LilyPond 2.6.4
warning: can't find file: `'
Processing `snippet-map.ly'
Parsing...
Processing `C:  est.html:6 (lily-533600811.ly)'
Parsing...
Interpreting music... [1]
Preprocessing graphical objects...
Calculating line breaks...
Writing lily-533600811-systems.tex...
Writing lily-533600811-systems.texi...
Layout output to `lily-533600811-1.eps'...
Layout output to `lily-533600811.eps'...
Converting to PNG...
error: failed files: "Files\\LilyPond\\usr\\bin"

lilypond-book.py: error: Process lilypond --formats=ps,png --backend eps  -I
C:\
Program Files\LilyPond\usr\bin snippet-map.ly lily-533600811 exited
unsuccessful
ly.
Removing `test.html'

As a final test - I made a copy of the c:\program files\lilypond directory
and saved it under the root of c:\.  If I run lilypond-book.py from that
copy (so that it is located in c:\lilypond\usr\bin rather than c:\program
files\lilypond\usr\bin) then the script completes successfully and
everything is created properly.

So, is there something I can change in the lilypond-book.py file to correct
this?

Vaylor Trucks




_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: New to the list, question about lilypond-book

Han-Wen Nienhuys
Vaylor Trucks wrote:
> First of all, let me say that I am super impressed with LilyPond.  Up to
> this point I have been scrimping by with a patchwork of Finale Notepad,
> Cakewalk, and hand-drawn ugliness.  Discovering LilyPond has been a real
> treat.

thanks!

> So, is there something I can change in the lilypond-book.py file to
> correct this?

Try applying the patch attached.

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

? .lineno
? 1000.scsm
? Lily_piano.socket
? System
? ab
? add
? aly
? arial.pfa
? ay
? ay.tar.gz
? aybabtu.afm
? b
? bench.sh
? bla
? bla.lytex
? calls
? cf2.zip
? cffpats
? conf32255.sh
? config-g16.hh
? config-g164.hh
? config-g164.make
? config-g16nothread.hh
? config-g16nothread.make
? config-g16opt.hh
? config-opt.hh
? config-optsize.hh
? config-optsize.make
? config-prof.hh
? config-speed.hh
? config-speed.make
? configure
? cont
? cp.out
? crashes
? d
? dif
? example-1.socket
? example-1.texstr
? exp.scm
? fcc.c
? fi.py
? fingpats
? firefox.icns
? fondu3FB3-2
? fondu_src-050825.tgz
? fontconfig
? fontconfig.c
? foo
? foo.c
? glob
? grob-array-pats
? gsbug-inv
? gspatch
? gstest
? hello
? hello.utf
? htpasswd
? invstrength
? les-nereides.dsc
? les-nereides.texstr
? les-nereides.textmetrics
? lib
? lilymydear.zip
? lilypond-2.6.0-2.7.0.diff
? lilypond-internals.texi
? lilypond-tools.zip
? log
? lppats
? lute_archives
? m
? makefile.pango
? makelily.py
? mehl
? morgenlied.lpm
? morgenlied.texstr
? mozart-hrn-3.socket
? munix
? notitle.zip
? o
? ok
? os
? otftest.c
? out-g164
? out-g16nothread
? out-optsize
? out-speed
? out.ai
? out.pfa
? out.sk
? out.spsc
? p
? p2
? pango
? pango.c
? patent
? polyprof
? quotpats
? re
? setup.ini
? sf.ai
? simple-song.twy
? socket-output
? stat
? string
? sys
? t2.c
? talk.py
? test.scm
? test.socket
? test.socket.socket
? timtekst
? ud
? uninstalldirs
? us
? usr
? ver
? wrap.scm
? wtk-prof
? wtk-prof2
? wtk1-fugue2.scm
? wtk1-fugue2.socket
? Documentation/out-g164
? Documentation/out-optsize
? Documentation/bibliography/out-g164
? Documentation/bibliography/out-optsize
? Documentation/misc/out-g164
? Documentation/misc/out-optsize
? Documentation/pictures/out-g164
? Documentation/pictures/out-optsize
? Documentation/topdocs/out-g164
? Documentation/topdocs/out-optsize
? Documentation/user/out-g164
? Documentation/user/out-optsize
? buildscripts/out-g164
? buildscripts/out-optsize
? cygwin/out-g164
? cygwin/out-optsize
? debian/out-g164
? elisp/out-g164
? elisp/out-optsize
? flower/out-g164
? flower/out-optsize
? flower/include/out-g164
? flower/include/out-optsize
? input/bla
? input/follow-voice-break.pdf
? input/follow-voice-break.ps
? input/out-g164
? input/out-optsize
? input/mutopia/out-g164
? input/mutopia/out-optsize
? input/mutopia/E.Satie/out-g164
? input/mutopia/E.Satie/out-optsize
? input/mutopia/F.Schubert/out-g164
? input/mutopia/F.Schubert/out-optsize
? input/mutopia/J.S.Bach/out-g164
? input/mutopia/J.S.Bach/out-optsize
? input/mutopia/R.Schumann/out-g164
? input/mutopia/R.Schumann/out-optsize
? input/mutopia/W.A.Mozart/out-g164
? input/mutopia/W.A.Mozart/out-optsize
? input/no-notation/out-g164
? input/no-notation/out-optsize
? input/regression/out-g164
? input/regression/out-optsize
? input/test/out-g164
? input/test/out-optsize
? input/tutorial/out-g164
? input/tutorial/out-optsize
? input/tutorial/out-prof
? input/tutorial/out-www
? kpath-guile/out
? kpath-guile/out-g16
? kpath-guile/out-g164
? kpath-guile/out-g16nothread
? kpath-guile/out-g16opt
? kpath-guile/out-opt
? kpath-guile/out-optsize
? kpath-guile/out-prof
? kpath-guile/out-speed
? kpath-guile/out-www
? lily/gmon.out
? lily/out
? lily/out-g16
? lily/out-g164
? lily/out-g16nothread
? lily/out-g16opt
? lily/out-opt
? lily/out-optsize
? lily/out-prof
? lily/out-speed
? lily/out-www
? lily/parser.output
? lily/include/out
? lily/include/out-g16
? lily/include/out-g164
? lily/include/out-g16nothread
? lily/include/out-g16opt
? lily/include/out-opt
? lily/include/out-optsize
? lily/include/out-prof
? lily/include/out-speed
? lily/include/out-www
? ly/out
? ly/out-g16
? ly/out-g164
? ly/out-g16nothread
? ly/out-g16opt
? ly/out-opt
? ly/out-optsize
? ly/out-prof
? ly/out-speed
? ly/out-www
? make/out
? make/out-g16
? make/out-g164
? make/out-g16nothread
? make/out-g16opt
? make/out-opt
? make/out-optsize
? make/out-prof
? make/out-speed
? make/out-www
? mf/Fontmap
? mf/feta-braces-e.600pk
? mf/feta20.600pk
? mf/feta23.afm
? mf/feta23.pfa.raw
? mf/ffbug.tar.gz
? mf/ffbug.zip
? mf/mftrace.dir
? mf/out
? mf/out-g16
? mf/out-g164
? mf/out-g16nothread
? mf/out-g16opt
? mf/out-opt
? mf/out-optsize
? mf/out-prof
? mf/out-speed
? mf/out-www
? po/out
? po/out-g16
? po/out-g164
? po/out-g16nothread
? po/out-g16opt
? po/out-opt
? po/out-optsize
? po/out-prof
? po/out-speed
? po/out-www
? ps/out
? ps/out-g16
? ps/out-g164
? ps/out-g16nothread
? ps/out-g16opt
? ps/out-opt
? ps/out-optsize
? ps/out-prof
? ps/out-speed
? ps/out-www
? python/convertrules.pyc
? python/fontextract.pyc
? python/lilylib.pyc
? python/out
? python/out-g16
? python/out-g164
? python/out-g16nothread
? python/out-g16opt
? python/out-opt
? python/out-optsize
? python/out-prof
? python/out-speed
? python/out-www
? scm/out
? scm/out-g16
? scm/out-g164
? scm/out-g16nothread
? scm/out-g16opt
? scm/out-opt
? scm/out-optsize
? scm/out-prof
? scm/out-speed
? scm/out-www
? scm/point
? scm/texi
? scripts/out
? scripts/out-g16
? scripts/out-g164
? scripts/out-g16nothread
? scripts/out-g16opt
? scripts/out-opt
? scripts/out-optsize
? scripts/out-prof
? scripts/out-speed
? scripts/out-www
? stepmake/out
? stepmake/out-g16
? stepmake/out-g164
? stepmake/out-g16nothread
? stepmake/out-g16opt
? stepmake/out-opt
? stepmake/out-optsize
? stepmake/out-prof
? stepmake/out-speed
? stepmake/out-www
? stepmake/bin/out
? stepmake/bin/out-g16
? stepmake/bin/out-g164
? stepmake/bin/out-g16nothread
? stepmake/bin/out-g16opt
? stepmake/bin/out-opt
? stepmake/bin/out-optsize
? stepmake/bin/out-prof
? stepmake/bin/out-speed
? stepmake/bin/out-www
? stepmake/bin/packagepython.pyc
? stepmake/stepmake/out
? stepmake/stepmake/out-g16
? stepmake/stepmake/out-g164
? stepmake/stepmake/out-g16nothread
? stepmake/stepmake/out-g16opt
? stepmake/stepmake/out-opt
? stepmake/stepmake/out-optsize
? stepmake/stepmake/out-prof
? stepmake/stepmake/out-speed
? stepmake/stepmake/out-www
? tex/foo
? tex/out
? tex/out-g16
? tex/out-g164
? tex/out-g16nothread
? tex/out-g16opt
? tex/out-opt
? tex/out-optsize
? tex/out-prof
? tex/out-speed
? tex/out-www
? ttftool/out
? ttftool/out-speed
? ttftool/out-www
? ttftool/include/out
? ttftool/include/out-speed
? ttftool/include/out-www
? vim/out
? vim/out-g16
? vim/out-g164
? vim/out-g16opt
? vim/out-opt
? vim/out-optsize
? vim/out-prof
? vim/out-www
Index: ChangeLog
===================================================================
RCS file: /cvsroot/lilypond/lilypond/ChangeLog,v
retrieving revision 1.4253
diff -u -r1.4253 ChangeLog
--- ChangeLog 10 Nov 2005 11:40:57 -0000 1.4253
+++ ChangeLog 10 Nov 2005 19:03:23 -0000
@@ -5,6 +5,9 @@
 
 2005-11-10  Han-Wen Nienhuys  <[hidden email]>
 
+ * scripts/lilypond-invoke-editor.scm (run-browser): look at
+ $BROWSER.
+
  * Documentation/user/point-and-click.itely: simplify p&c
  instruction: don't configure firefox. Put lilypond-invoke-editor
  in front of the browser.
Index: scm/layout-page-layout.scm
===================================================================
RCS file: /cvsroot/lilypond/lilypond/scm/layout-page-layout.scm,v
retrieving revision 1.2
diff -u -r1.2 layout-page-layout.scm
--- scm/layout-page-layout.scm 24 Oct 2005 08:48:34 -0000 1.2
+++ scm/layout-page-layout.scm 10 Nov 2005 19:03:25 -0000
@@ -256,7 +256,7 @@
      (if (= dir UP)
  (ly:stencil-translate-axis
   (annotate-y-interval layout
-      "topspace"
+      "pagetopspace"
       (cons
        (- (min 0 (* dir sep))
   (ly:output-def-lookup layout 'pagetopspace))
Index: scripts/lilypond-book.py
===================================================================
RCS file: /cvsroot/lilypond/lilypond/scripts/lilypond-book.py,v
retrieving revision 1.277
diff -u -r1.277 lilypond-book.py
--- scripts/lilypond-book.py 8 Nov 2005 12:57:27 -0000 1.277
+++ scripts/lilypond-book.py 10 Nov 2005 19:03:25 -0000
@@ -33,6 +33,7 @@
 import stat
 import string
 import tempfile
+import commands
 
 # Users of python modules should include this snippet
 # and customize variables below.
@@ -1634,7 +1635,7 @@
       + ' --formats=%s --backend eps ' % formats
 
  if process_cmd:
- process_cmd += string.join ([(' -I %s' % p)
+ process_cmd += string.join ([(' -I %s' % commands.mkarg (p))
      for p in include_path])
 
  ly.identify (sys.stderr)
Index: scripts/lilypond-invoke-editor.scm
===================================================================
RCS file: /cvsroot/lilypond/lilypond/scripts/lilypond-invoke-editor.scm,v
retrieving revision 1.9
diff -u -r1.9 lilypond-invoke-editor.scm
--- scripts/lilypond-invoke-editor.scm 10 Nov 2005 01:14:39 -0000 1.9
+++ scripts/lilypond-invoke-editor.scm 10 Nov 2005 19:03:25 -0000
@@ -120,9 +120,10 @@
   (exit 1)))))
 
 (define (run-browser uri)
-
-  ;; TODO: make educated guess which browser to run.
-  (system (format #f "firefox -remote 'OpenURL(~a,new-tab)'" uri)))
+  (system
+   (if (getenv "BROWSER")
+       (format "~a ~a" (getenv "BROWSER") uri)
+       (format #f "firefox -remote 'OpenURL(~a,new-tab)'" uri))))
 
 (define (main args)
   (let ((files (parse-options args)))

_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: New to the list, question about lilypond-book

Vaylor Trucks
I'm very sorry if this is covered in the manual or somewhere online, but can
someone explain to me how to implement the patch?

Vaylor


>From: Han-Wen Nienhuys <[hidden email]>

>Try applying the patch attached.
>
>--
>  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen




_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: New to the list, question about lilypond-book

Han-Wen Nienhuys
Vaylor Trucks wrote:
> I'm very sorry if this is covered in the manual or somewhere online, but
> can someone explain to me how to implement the patch?
>
> Vaylor
>

No problem, try downloading the latest version of the lilypond-book.py
file from

http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/lilypond/lilypond/scripts/lilypond-book.py?rev=1.278&only_with_tag=lilypond_2_6&content-type=text/plain


(if you appreciate this service, consider a donation. see
http://lilypond.org/web/sponsor/ )

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: New to the list, question about lilypond-book

Mats Bengtsson-6
This will not work entirely well since the installed version of the file
has a
few lines that differ compared to the "source code" version that you get if
you follow Han-Wen's instructions.

Just copy the lines with "datadir = ..." from your original version into
the
one from savannah.gnu.org and it should work well.

By the way, I assume that you use the Cygwin version, right?
I'm trying to make the native Windows version of lilypond-book to
work correctly as well.

   /Mats

Han-Wen Nienhuys wrote:

> Vaylor Trucks wrote:
>
>> I'm very sorry if this is covered in the manual or somewhere online,
>> but can someone explain to me how to implement the patch?
>>
>> Vaylor
>>
>
> No problem, try downloading the latest version of the lilypond-book.py
> file from
>
> http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/lilypond/lilypond/scripts/lilypond-book.py?rev=1.278&only_with_tag=lilypond_2_6&content-type=text/plain 
>
>
>
> (if you appreciate this service, consider a donation. see
> http://lilypond.org/web/sponsor/ )
>

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
        Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================



_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: New to the list, question about lilypond-book

Vaylor Trucks
Actually, I am not using Cygwin at the moment.  I saw that jEdit has a
Cygwin (bash.exe) requirement as well, and therefore I decided not to
install it.  I am using a different IDE-type editor instead.

I will try your substitutions in the new version and see what I get.  Thanks
for the help.

Vaylor


>From: Mats Bengtsson <[hidden email]>
>To: Vaylor Trucks <[hidden email]>
>CC: Han-Wen Nienhuys <[hidden email]>,  [hidden email]
>Subject: Re: New to the list, question about lilypond-book
>Date: Fri, 11 Nov 2005 13:34:32 +0100
>
>This will not work entirely well since the installed version of the file
>has a
>few lines that differ compared to the "source code" version that you get if
>you follow Han-Wen's instructions.
>
>Just copy the lines with "datadir = ..." from your original version into
>the
>one from savannah.gnu.org and it should work well.
>
>By the way, I assume that you use the Cygwin version, right?
>I'm trying to make the native Windows version of lilypond-book to
>work correctly as well.
>
>   /Mats
>
>Han-Wen Nienhuys wrote:
>
>>Vaylor Trucks wrote:
>>
>>>I'm very sorry if this is covered in the manual or somewhere online, but
>>>can someone explain to me how to implement the patch?
>>>
>>>Vaylor
>>>
>>
>>No problem, try downloading the latest version of the lilypond-book.py
>>file from
>>
>>http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/lilypond/lilypond/scripts/lilypond-book.py?rev=1.278&only_with_tag=lilypond_2_6&content-type=text/plain
>>
>>
>>
>>(if you appreciate this service, consider a donation. see
>>http://lilypond.org/web/sponsor/ )
>>
>
>--
>=============================================
> Mats Bengtsson
> Signal Processing
> Signals, Sensors and Systems
> Royal Institute of Technology
> SE-100 44  STOCKHOLM
> Sweden
> Phone: (+46) 8 790 8463
>        Fax:   (+46) 8 790 7260
> Email: [hidden email]
> WWW: http://www.s3.kth.se/~mabe
>=============================================
>




_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user