Hi David, Here is how I get the \gitCommitish in the tagline. First, include the "gitDefinitions.ily" file. I use something like this:
\include "/home/workspace/include/gitDefinitions.ily" Then in the header declaration, add the \gitCommitish and any other items desired to the tagline entry: \header { title = "Title" composer = "" arranger = "" meter = "" tagline = \markup { \filename " " \source " " git Version: \gitCommitish Committed: \gitDateTime Engraved: \simple #(strftime "%d - %b - %Y - %H%M " (localtime (current-time))) } } An example tagline from a score I am editing presently looks like this: Here \source is just a note to remind me where I got the information i used. This could be person's name or whatever. For the tagline above, \source is "null", so that value is missing from the tagline. I hope that the above is helpful to others. Regarding your comment about adding an expression to \bookOutputSuffix -- that is what I am trying to do. That said, \bookOutputSuffix "\gitCommitish" or \bookOutputSuffix = \gitCommitish does not work as expected. What I seek is a way to append whatever the current git version is to the pdf filename that is generated so I don't have to open the pdf and check the tagline to see what version it is when searching for a specific version. Appending the git version to the filename would make it easier to know which version is represented by the pdf when searching through the directory. The Guile information I have seen so far online has not been too helpful for this particular question. If anyone has any ideas, I would enjoy seeing those. Cheers, Ben On Sun, 2018-01-14 at 11:37 +0100, David Kastrup wrote: > Ben Beeson <bwbe...@gmail.com> writes: > > > Hello all, > > > > I am using git to keep track of edits to scores and am presently > > using > > > > > > \bookOutputName "score-filename" > > > > to write the output filename for the pdf that is generated in the > > LilyPond "ly" file. I am also using > > > > "git Version: \gitCommitish " > > > > in the tagline so the generated pdf has the git version information > > included in the score that is generated. > > How would that work? > > > I am wondering if there is a way to include \gitCommitish in > > \bookOutputSuffix so that the output filename looks like: > > > > "score-filename-gitversion.pdf". > > > > So far I have not been able to figure out how to do that or find an > > existing solution in the snippets, forum or elsewhere. If anyone > > has > > a solution, please share it. > > It's easy to use any Guile string expression as argument to > \bookOutputSuffix but I have no idea how you manage to get the > Commitish > into the tagline. >
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user