Fix handling of 'alttitle' variable to support both strings and lists in csv #1440
@ -358,7 +358,7 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s
|
||||
(songvars (cdr song))
|
||||
(page-number (number->string (assoc-get (assq-ref songvars 'label) labelPageTable)))
|
||||
(extractedheadervars (extract-and-check-vars-from-header (assq-ref songvars 'header)
|
||||
'(title starttext alttitle altalttitle categorytitle categories authors year_text year_melody year_translation year_composition infotext translation pronunciation copyright source)))
|
||||
'(title starttext alttitle categorytitle categories authors year_text year_melody year_translation year_composition infotext translation pronunciation copyright source)))
|
||||
(headervar-or-empty (lambda (varsym)
|
||||
(let ((extracted (assq-ref extractedheadervars varsym)))
|
||||
(if extracted extracted ""))))
|
||||
@ -378,8 +378,11 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s
|
||||
page-number
|
||||
(headervar-or-empty 'title)
|
||||
(headervar-or-empty 'starttext)
|
||||
(headervar-or-empty 'alttitle)
|
||||
(headervar-or-empty 'altalttitle)
|
||||
(let ((alttitle-value (headervar-or-empty 'alttitle)))
|
||||
(if (list? alttitle-value)
|
||||
(string-join alttitle-value ", ") ; Wenn eine Liste, dann zusammenfügen
|
||||
alttitle-value)) ; Wenn kein Liste, den originalen Wert verwenden
|
||||
|
||||
(headervar-or-empty 'categorytitle)
|
||||
(headervar-or-empty 'categories)
|
||||
(format-authors (append poetIds (map car versePoetData)))
|
||||
@ -404,7 +407,6 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s
|
||||
"title"
|
||||
"starttext"
|
||||
"alttitle"
|
||||
"altalttitle"
|
||||
"categorytitle"
|
||||
"categories"
|
||||
"poets"
|
||||
|
Loading…
x
Reference in New Issue
Block a user