On 11-06-22 05:47 AM, Dmytro O. Redchuk wrote:
On Wed 22 Jun 2011, 11:53 Graham Percival wrote:
ok, how about this? Your script should:
echo "\header { tagline = ##f } "> /tmp/lilypond-no-header.ly
. o O ( \\header, of course )
lilypond -dinclude-settings=/tmp/lilypond-no-header.ly --png bug.ly
convert bug.png -trim bug-upload.png
something like that. Could you test it, then we can have a set
script for bug squad members (on linux and osx at least) to
produce great pngs for the tracker?
I would start with this:
#!/bin/bash
#
#
ly=${1:?Usage: $0 test[.ly]}
# strip extension, if any:
lynoext=${ly%%.ly}
# process test file:
echo "\\header { tagline = ##f }" | lilypond -dinclude-settings=- --png $ly
# trim PNG:
convert ${lynoext}.png -trim ${lynoext}-trim.png
# do we want to overwrite "original" PNG?
# mv ${lynoext}-trim.png ${lynoext}.png
Do we need more options? For trimming "in place" or something else?
Cheers,
- Graham
On Wed 22 Jun 2011, 13:17 David Kastrup wrote:
lilypond -dinclude-settings=<(echo "\header { tagline = ##f }") --png bug.ly
I does not work here; i don't know why.
After a bit of testing, it seems that settings in \included files,
however the include is done (very smooth trick, that, David!), are
overridden if the tag exists in the destination file. Where a .ly file
already has the tagline set, it cancels the imported one. To do this
from a script will, after all, take some sed or perhaps python magic.
I'll keep at it, as much for education as for the satisfaction!
In the meantime, though, does lilypond -dpreview bug.ly not work adequately?
Colin
--
The human race has one really effective weapon, and that is laughter.
-- Mark Twain
_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond