[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can we pass in header variables as CLI parameters?
From: |
Timothy Lanfear |
Subject: |
Re: can we pass in header variables as CLI parameters? |
Date: |
Sat, 18 Mar 2017 09:32:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 17/03/17 21:10, Ian Ring wrote:
Hi, sorry if this has been asked before...
Is it possible to pass in header variables in via the CLI?
For example, I would like to pass the copyright date in via a
parameter, instead of it being saved in the .LY file.
This can be done in LaTeX, so I hope there is a way to do something
similar in lilypond.
Cheers
Ian
You could define a variable on the command line and insert it into the
header block of a Lilypond file.
\version "2.18.2"
#(use-modules (guile-user))
\header { copyright = \markup { "©" \year "The Composer" } }
{ c''1 }
lilypond -e '(define-public year "2017")' tmp.ly
See
http://lilypond.org/doc/v2.19/Documentation/usage/command_002dline-usage#basic-command-line-options-for-lilypond
--
Timothy Lanfear, Bristol, UK.