denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] quick script to find lilypond version


From: Richard Shann
Subject: Re: [Denemo-devel] quick script to find lilypond version
Date: Mon, 09 Mar 2009 19:12:01 +0000

On Mon, 2009-03-09 at 12:40 -0500, Jeremiah Benham wrote:
> On Fri, 2009-03-06 at 17:43 +0000, Richard Shann wrote:
> > On Fri, 2009-03-06 at 10:19 -0600, Jeremiah Benham wrote:
> > > lilypond --version | grep 'GNU LilyPond' | cut -c14-19
> > > 
> > You wouldn't want to set up the pipes from inside Denemo, instead run
> > lilypond --version
> > capturing the stdout (or stderr whichever it is in) as done in print.c
> > for getting the lilypond error messages and popping them up as
> > infodialog. 
> > Then parse that captured stdout/err either crudely with sscanf (very
> > sensitive to minor changes in lilypond output) or perhaps better with
> > scheme's regexp stuff (see the new scripts for editing directives), or I
> > think there may be some parser utilities in glib, or at least some
> > string utilities to ease the pain...
> 
> 
> I would like to use the stderr output and then use schemes regexp. I am
> not sure how to use the scheme code within c. I think this is a
> fascinating idea. Can you point me to an example? 
I haven't had a chance to think about it much - I am slightly uneasy
that we may create something convoluted here. But I think we could run
into portability issues if we started spawning process from guile (that
is if we tried to run lilypond from scheme). So it may be the way to go.
There is a function call_out_to_guile (first thing in view.c) which
executes an arbitrary string in the toplevel environment.
Richard



> It think this will
> also help me to improve importmidi functionality because then I don't
> have to worry about doing things like checking to see if a new measure
> needs to added and so on. 
> 
> Jeremiah
> 
> > 
> > Richard
> > 
> > 
> > 
> > 
> > > 
> > > I don't know if we can use this in anyway or not. 
> > > 
> > > Jeremiah
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Denemo-devel mailing list
> > > address@hidden
> > > http://lists.gnu.org/mailman/listinfo/denemo-devel
> > 
> > 
> > 
> > _______________________________________________
> > Denemo-devel mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/denemo-devel
> 





reply via email to

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