lilypond-user
[Top][All Lists]
Advanced

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

Re: How to append a git version to an output filename


From: Thomas Morley
Subject: Re: How to append a git version to an output filename
Date: Sun, 14 Jan 2018 17:56:20 +0100

Hi Ben,

2018-01-14 17:26 GMT+01:00 David Kastrup <address@hidden>:
> Ben Beeson <address@hidden> writes:
>
>> Hi David,
>> Here is how I get the \gitCommitish in the tagline. First, include the
>> "gitDefinitions.ily" file.
>
> What is that?
>
>> 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 about
>
> \bookOutputSuffix \gitCommitish
>
> then?
>
>> The Guile information I have seen so far online has not been too
>> helpful for this particular question.
>
> string-append and similar functions exist.
>
> --
> David Kastrup



noone can help if you don't provide the needed information.
Your gitCommitish _may_ be the same as in
https://github.com/openlilylib/snippets/blob/master/editorial-tools/git-commands/
or not. Noone can tell.
A minimal working example with the used version would have been nice as well.


So for now I _guess_ you took it from there.

The problem then: `bookOutputSuffix' expects a string, but you provide
a markup. Can't work.
Different possibilities to proceed:
- catch what you need from the markup-command and write something
outputting a string
- markup->string

Cheers,
 Harm



reply via email to

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