[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Specify output directory *in* the file
From: |
Timothy Lanfear |
Subject: |
Re: Specify output directory *in* the file |
Date: |
Tue, 18 Apr 2017 22:48:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 18/04/17 20:28, Thomas Morley wrote:
#(format #t
"\nCurrent output-filename: \"~a\"\n"
(paper-variable (ly:parser-lookup '$current-book) 'output-filename))
This example of ly:parser-lookup was the clue I needed to figure out how
to read fields in a book's header.
\version "2.19.59"
#(define (booktitle)
(let* ((mybook (ly:parser-lookup '$current-book))
(myheader (ly:book-header mybook)))
(module-ref myheader 'title)))
\book {
\header { title = "MyPiece" }
\bookOutputName #(string-join (list (getcwd) (booktitle)) "/")
\score { c''1 }
}
--
Timothy Lanfear, Bristol, UK.