include all files in a folder

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

include all files in a folder

Craig Dabelstein
Hi Lilyponders,

Is there some form of code for including all files in a folder?

Instead of entering every file on a separate line like this:

\include "../Notes/movtI/fluteI.ily"
\include "../Notes/movtI/fluteII.ily"
etc

Is there something like this that will work?

\include "../Notes/movtI/*.ily"

Any ideas?

All the best.

Craig


Craig Dabelstein
 

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

Re: include all files in a folder

Joseph Chrestien

Hi,

I'm not sure at all, but you might want to try to create a scheme function calling the #scandir scheme function.

Otherwise, a rather unLilyPondic solution: call a Python or bash line from within lilypond using scheme function syscall :
That would include something like this :

#(define mycall '"\include $(ls *.ly)" > allIncludes.ly')
pyMx=#(define-music-function (parser location)()(system mycall);; or: (system* mycall ) #{ #})

Then \include allIncludes in your lily file.

Good luck,
Jo




On Mon, Aug 29, 2016 at 6:27 AM +0200, "Craig Dabelstein" <[hidden email]> wrote:

Hi Lilyponders,

Is there some form of code for including all files in a folder?

Instead of entering every file on a separate line like this:

\include "../Notes/movtI/fluteI.ily"
\include "../Notes/movtI/fluteII.ily"
etc

Is there something like this that will work?

\include "../Notes/movtI/*.ily"

Any ideas?

All the best.

Craig


Craig Dabelstein
 

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

Re: include all files in a folder

Urs Liska
In reply to this post by Craig Dabelstein


Am 29. August 2016 06:27:14 MESZ, schrieb Craig Dabelstein <[hidden email]>:
>Hi Lilyponders,
>
>Is there some form of code for including all files in a folder?

https://github.com/openlilylib/snippets/tree/master/general-tools/includeHelper

HTH
Urs

>
>Instead of entering every file on a separate line like this:
>
>\include "../Notes/movtI/fluteI.ily"
>\include "../Notes/movtI/fluteII.ily"
>etc
>
>Is there something like this that will work?
>
>\include "../Notes/movtI/*.ily"
>
>Any ideas?
>
>All the best.
>
>Craig
>
>
>*Craig Dabelstein*
>e:[hidden email]
><http://www.facebook.com/craig.dabelstein>
><http://au.linkedin.com/pub/craig-dabelstein/b2/5b8/389/en>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>lilypond-user mailing list
>[hidden email]
>https://lists.gnu.org/mailman/listinfo/lilypond-user

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

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

Re: include all files in a folder

Craig Dabelstein
Thanks Urs.


On 29 August 2016 at 16:28, Urs Liska <[hidden email]> wrote:


Am 29. August 2016 06:27:14 MESZ, schrieb Craig Dabelstein <[hidden email]>:
>Hi Lilyponders,
>
>Is there some form of code for including all files in a folder?

https://github.com/openlilylib/snippets/tree/master/general-tools/includeHelper

HTH
Urs

>
>Instead of entering every file on a separate line like this:
>
>\include "../Notes/movtI/fluteI.ily"
>\include "../Notes/movtI/fluteII.ily"
>etc
>
>Is there something like this that will work?
>
>\include "../Notes/movtI/*.ily"
>
>Any ideas?
>
>All the best.
>
>Craig
>
>
>*Craig Dabelstein*
>[hidden email]
><http://www.facebook.com/craig.dabelstein>
><http://au.linkedin.com/pub/craig-dabelstein/b2/5b8/389/en>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>lilypond-user mailing list
>[hidden email]
>https://lists.gnu.org/mailman/listinfo/lilypond-user

--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.


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