On 2023-12-10 9:33 pm, Stefano Antonelli wrote:
On Sun, 2023-12-10 at 08:46 -0500, Michael Werner wrote:
I'm not at all familiar with ly2video, so I really have no idea if
this'll be directly useful to you. But for getting the headers from
an included file, this is how I do it with nearly all the music I
engrave. Maybe it can serve as a starting point.
The issue is that ly2video parses anotherFile.ly directly and it can't
see the fields in the header block because they are defined in song.ly.
It doesn't have lilypond's smarts to parse "\include song.ly".
(Apologies for jumping in here.)
Why should ly2video need any such smarts at all? Since there are myriad
ways an end user can structure their input files, let LilyPond do its
job and have ly2video ask it for all the information needed. It sounds
like ly2video is already injecting code to add new engravers and what
not for extracting timing details. Do the same but dump all of the
relevant header fields while you are at it. At this point, ly2video
only needs to parse this extracted data and can completely ignore what
the end user is doing in their source.
P.S. I should note that I have never used ly2video before, so I am
commenting mainly as an outside observer to this use case.
-- Aaron Hill