On Wed, 6 Mar 2013, Knut Petersen wrote:
A 2nd issue: title generation does work, but it is broken. Only the last
characters of the
subsubtitle string are used, title and subtitle strings are completely
ignored.
Are you referring to https://github.com/aspiers/ly2video/issues/49 ?
My subsubtitle is a youtube address:
title = "This will be ignored"
subtitle = "This also will be ignored"
subsubtitle = "Quelle: http://www.youtube.com/watch?v=1q2r3s4t5u6"
First of all, title and subtitle are ignored, the subsubtitle string is used.
Probably the issue 49 problem.
I have found an easy workaround for this problem: In your lilypond file
simply put the line with the title AFTER the subtitle and subsubtitle
lines.
Another workaround is to make a small change in ly2video.py. This patch
will only work if there is at least one space before "title" in your
Lilypond file. For me this also works.
I am not very good at regular expressions, but I guess the real fix
requires a better matching regular expression in that line in ly2video.py.
Until then, here is my easy hack:
--- ly2video.py.orig 2013-03-07 09:40:54.675565398 +0100
+++ ly2video.py 2013-03-07 09:52:19.787389048 +0100
@@ -1723,7 +1723,7 @@
fSanitisedLyFile.write("\\header {\n tagline = ##f composer =
##f\n}\n")
headerPart = True
- if re.search("title\\s*=", line):
+ if re.search(" title\\s*=", line):
titleText.name = line.split("=")[-1].strip()[1:-1]
if re.search("composer\\s*=", line):
titleText.author = line.split("=")[-1].strip()[1:-1]
--
MT
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user