lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lilypond svg output to stdout?


From: David Wright
Subject: Re: Lilypond svg output to stdout?
Date: Thu, 30 Apr 2020 15:52:07 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu 30 Apr 2020 at 21:58:28 (+0200), Marcel Aartsen wrote:
> As the subject says, I would like to have Lilypond output svg to stdout.
> Can it be done? How do I do that?

I don't think you can use stdout itself, as LP already uses it.
However, you can use a pipe:

$ mkfifo foo.svg
$ lilypond -dbackend=svg -o foo music.ly 

which will block until you, say,

$ cat foo.svg | some-consumer-of-svg

I haven't tested whether LP *insists* on adding an .svg extension.

> Some background: I am developing an online course in Open edX [1], and
> for that course I am writing an XBlock [2]. This means that the user on
> the front end triggers a request that is processed by some server-side
> Python code that, in my case, in turn calls Lilypond. Lilypond's output
> is ultimately on the front end to be displayed in html, so I figured
> that svg output would be best. And I reckon that it will be
> unnecessarily cumbersome and slow to let Lilypond write to file and then
> let the Python code read that file back from disk.
> 
> Any ideas to output Lilypond's svg to stdout? Or better alternatives?

Cheers,
David.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]