include adaptions/editings in author system
This commit is contained in:
		@@ -2,6 +2,7 @@
 | 
			
		||||
  poetPrefix = "Worte:"
 | 
			
		||||
  composerPrefix = "Weise:"
 | 
			
		||||
  compositionPrefix = "Satz:"
 | 
			
		||||
  adaptionPrefix = "Bearbeitung:"
 | 
			
		||||
  poetAndComposerEqualPrefix = "Worte und Weise:"
 | 
			
		||||
  voicePrefix = "Stimme:"
 | 
			
		||||
  versePrefix = "Strophe:"
 | 
			
		||||
 
 | 
			
		||||
@@ -102,14 +102,16 @@
 | 
			
		||||
            (verseComposerData (find-author-id-with-part-numbers 'meloverse authors))
 | 
			
		||||
            (voiceComposerData (find-author-id-with-part-numbers 'voice authors))
 | 
			
		||||
            (compositionIds (find-author-ids-by 'composition authors))
 | 
			
		||||
            (adaptionIds (find-author-ids-by 'adaption authors))
 | 
			
		||||
            (bridgeIds (find-author-ids-by 'bridge authors))
 | 
			
		||||
            (interludeIds (find-author-ids-by 'interlude authors))
 | 
			
		||||
            (year_text (chain-assoc-get 'header:year_text props #f))
 | 
			
		||||
            (year_translation (chain-assoc-get 'header:year_translation props #f))
 | 
			
		||||
            (year_melody (chain-assoc-get 'header:year_melody props #f))
 | 
			
		||||
            (year_composition (chain-assoc-get 'header:year_composition props #f))
 | 
			
		||||
            (year_adaption (chain-assoc-get 'header:year_adaption props #f))
 | 
			
		||||
            )
 | 
			
		||||
        (if (and (equal? poetIds composerIds) (null? translatorIds) (null? versePoetData) (null? verseComposerData) (null? voiceComposerData) (null? compositionIds) (null? bridgeIds) (null? interludeIds))
 | 
			
		||||
        (if (and (equal? poetIds composerIds) (null? translatorIds) (null? versePoetData) (null? verseComposerData) (null? voiceComposerData) (null? compositionIds) (null? adaptionIds) (null? bridgeIds) (null? interludeIds))
 | 
			
		||||
          (list
 | 
			
		||||
            (join-present (list
 | 
			
		||||
              (render-contribution-group (ly:output-def-lookup layout 'poetAndComposerEqualPrefix) poetIds)
 | 
			
		||||
@@ -133,7 +135,7 @@
 | 
			
		||||
                  ) ", ")
 | 
			
		||||
                ) "; ")
 | 
			
		||||
              ))
 | 
			
		||||
            (if (and (null? composerIds) (null? compositionIds) (null? verseComposerData) (null? voiceComposerData) (null? bridgeIds) (null? interludeIds)) #f
 | 
			
		||||
            (if (and (null? composerIds) (null? compositionIds) (null? adaptionIds) (null? verseComposerData) (null? voiceComposerData) (null? bridgeIds) (null? interludeIds)) #f
 | 
			
		||||
              (string-append
 | 
			
		||||
                (ly:output-def-lookup layout 'composerPrefix)
 | 
			
		||||
                " "
 | 
			
		||||
@@ -148,6 +150,10 @@
 | 
			
		||||
                    (render-contribution-group (ly:output-def-lookup layout 'compositionPrefix) compositionIds)
 | 
			
		||||
                    year_composition
 | 
			
		||||
                  ) ", ")
 | 
			
		||||
                  (join-present (list
 | 
			
		||||
                    (render-contribution-group (ly:output-def-lookup layout 'adaptionPrefix) adaptionIds)
 | 
			
		||||
                    year_adaption
 | 
			
		||||
                  ) ", ")
 | 
			
		||||
                  (render-contribution-group (ly:output-def-lookup layout 'bridgePrefix) bridgeIds)
 | 
			
		||||
                  (render-contribution-group (ly:output-def-lookup layout 'interludePrefix) interludeIds)
 | 
			
		||||
                ) "; ")
 | 
			
		||||
 
 | 
			
		||||
@@ -279,10 +279,11 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s
 | 
			
		||||
            (verseComposerData (find-author-id-with-part-numbers 'meloverse authors))
 | 
			
		||||
            (voiceComposerData (find-author-id-with-part-numbers 'voice authors))
 | 
			
		||||
            (compositionIds (find-author-ids-by 'composition authors))
 | 
			
		||||
            (adaptionIds (find-author-ids-by 'adaption authors))
 | 
			
		||||
            (bridgeIds (find-author-ids-by 'bridge authors))
 | 
			
		||||
            (interludeIds (find-author-ids-by 'interlude authors)))
 | 
			
		||||
        (delete-duplicates
 | 
			
		||||
          (append poetIds translatorIds (map car versePoetData) composerIds (map car verseComposerData) (map car voiceComposerData) compositionIds bridgeIds interludeIds))
 | 
			
		||||
          (append poetIds translatorIds (map car versePoetData) composerIds (map car verseComposerData) (map car voiceComposerData) compositionIds adaptionIds bridgeIds interludeIds))
 | 
			
		||||
    ))
 | 
			
		||||
    (let*
 | 
			
		||||
      (
 | 
			
		||||
@@ -358,7 +359,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 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 year_adaption infotext translation pronunciation copyright source)))
 | 
			
		||||
                   (headervar-or-empty (lambda (varsym)
 | 
			
		||||
                     (let ((extracted (assq-ref extractedheadervars varsym)))
 | 
			
		||||
                       (if extracted extracted ""))))
 | 
			
		||||
@@ -370,6 +371,7 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s
 | 
			
		||||
                   (verseComposerData (find-author-id-with-part-numbers 'meloverse authors))
 | 
			
		||||
                   (voiceComposerData (find-author-id-with-part-numbers 'voice authors))
 | 
			
		||||
                   (compositionIds (find-author-ids-by 'composition authors))
 | 
			
		||||
                   (adaptionIds (find-author-ids-by 'adaption authors))
 | 
			
		||||
                   (bridgeIds (find-author-ids-by 'bridge authors))
 | 
			
		||||
                   (interludeIds (find-author-ids-by 'interlude authors)))
 | 
			
		||||
              (map csv-escape
 | 
			
		||||
@@ -387,11 +389,12 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s
 | 
			
		||||
                  (headervar-or-empty 'categories)
 | 
			
		||||
                  (format-authors (append poetIds (map car versePoetData)))
 | 
			
		||||
                  (format-authors translatorIds)
 | 
			
		||||
                  (format-authors (append composerIds compositionIds bridgeIds interludeIds (map car voiceComposerData) (map car verseComposerData)))
 | 
			
		||||
                  (format-authors (append composerIds compositionIds adaptionIds bridgeIds interludeIds (map car voiceComposerData) (map car verseComposerData)))
 | 
			
		||||
                  (headervar-or-empty 'year_text)
 | 
			
		||||
                  (headervar-or-empty 'year_melody)
 | 
			
		||||
                  (headervar-or-empty 'year_translation)
 | 
			
		||||
                  (headervar-or-empty 'year_composition)
 | 
			
		||||
                  (headervar-or-empty 'year_adaption)
 | 
			
		||||
                  (headervar-or-empty 'copyright)
 | 
			
		||||
                  (headervar-or-empty 'source)
 | 
			
		||||
                  (format-info-paragraphs (headervar-or-empty 'infotext))
 | 
			
		||||
@@ -416,6 +419,7 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s
 | 
			
		||||
        "year_melody"
 | 
			
		||||
        "year_translation"
 | 
			
		||||
        "year_composition"
 | 
			
		||||
        "year_adaption"
 | 
			
		||||
        "copyright"
 | 
			
		||||
        "source"
 | 
			
		||||
        "infotext"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user