> On 10 Sep 2019, at 09:26, sir.teddy.the.fi...@gmail.com wrote: > > Hi all, > what would I have to do in order to retrieve the filename of my current > lilypond script so that I can use it as a variable and assign it to the > title-field?
Here's one way to do it. There might be other, better, ways. The snippets repository is your friend: http://lsr.di.unimi.it/LSR/Search \version "2.19.82" % from snippet 197: #(define comml (object->string (command-line))) #(define loc (+ (string-rindex comml #\space ) 2)) #(define commllen (- (string-length comml) 2)) #(define filen (substring comml loc commllen)) % filename #(define basen (basename filen)) \header { %title = \markup { \filen } title = \markup { \basen } } { c'1 } _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user