lilypond-user
[Top][All Lists]
Advanced

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

Re: Need help creating Scheme functions to automate includes of many sco


From: Vaughan McAlley
Subject: Re: Need help creating Scheme functions to automate includes of many scores in a project
Date: Tue, 26 Jun 2018 11:23:22 +1000

On 26 June 2018 at 05:19, Nah <address@hidden> wrote:
> I have a project with 100+ scores, each in their own file. I tried to create
> a Scheme function to \include each of them. After searching the archive, I
> got the general idea of why my solution isn't working. However, I didn't
> find something like a snippet that I could coax into what I want. I have
> programming experience in C, Python, etc., but I'm still pretty clueless
> with Scheme.
>
> What I want is a function that does something like:
> foreach fname #{ \include #fname #}
>
> In Python, I would just read all the filenames in the directory, sort them,
> then run the foreach. Can I do something like that in Scheme? And how do I
> put the result in a form that will work with \include?
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user

You could modify your lilypond command to run a Python script to
create a dynamic file like allIncludes.ly:

\include "Piece01.ly"
\include "Piece02.ly"
...

This is pretty easy in Frescobaldi, or you could do it with Make for a
little bit of respectability…

Vaughan



reply via email to

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