From 7ab91abb3b51c80293f4c1a158782944642e2ad8 Mon Sep 17 00:00:00 2001 From: tux Date: Sun, 20 Aug 2023 12:16:18 +0200 Subject: [PATCH] example data for authors and songs --- data/authors.json | 14 ++++++++++++++ data/songs.json | 7 +++++++ lieder/vorlage/vorlage.ly | 4 ++-- lieder/vorlage_light/vorlage_light.ly | 3 +-- lieder/vorlage_satz/vorlage_satz.ly | 4 ++-- lilypond-common-includes | 2 +- lilypond-custom-includes/authors.ly | 16 ---------------- lilypond-custom-includes/base_config.ly | 5 +++-- 8 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 data/authors.json create mode 100644 data/songs.json delete mode 100644 lilypond-custom-includes/authors.ly diff --git a/data/authors.json b/data/authors.json new file mode 100644 index 0000000..fb98336 --- /dev/null +++ b/data/authors.json @@ -0,0 +1,14 @@ +{ + "dude": { + "name": "Krasser Dude", + "trail_name": "dud", + "birth_year": "1950", + "organization": "Bund der krassen Dudes" + }, + "kumpel": { + "name": "Krasser Kumpel", + "trail_name": "dudekumpel", + "death_year": "2050", + "organization": "Bund der krassen Kumpels" + } +} \ No newline at end of file diff --git a/data/songs.json b/data/songs.json new file mode 100644 index 0000000..d46e726 --- /dev/null +++ b/data/songs.json @@ -0,0 +1,7 @@ +{ + "a-song-id": { + "title": "Krasse Vorlage", + "composer": "kumpel", + "poet": "dude" + } +} \ No newline at end of file diff --git a/lieder/vorlage/vorlage.ly b/lieder/vorlage/vorlage.ly index 9f6417a..409f405 100644 --- a/lieder/vorlage/vorlage.ly +++ b/lieder/vorlage/vorlage.ly @@ -16,8 +16,8 @@ HEADER = \bookpart { alttitle = "Alternativtitel" titlesize = 11 titletopspace = 2 - poetId = #'dude - composerId = #'dude + poetId = "dude" + composerId = "dude" copyright = "Fumpeverlag" categories = "see" songinfo = "Hintergrund diff --git a/lieder/vorlage_light/vorlage_light.ly b/lieder/vorlage_light/vorlage_light.ly index d100b10..994076b 100644 --- a/lieder/vorlage_light/vorlage_light.ly +++ b/lieder/vorlage_light/vorlage_light.ly @@ -5,8 +5,7 @@ HEADER = \bookpart { \header { title = "Titel" - poetId = #'dude - composerId = #'kumpel + songId = "a-song-id" categories = "" songinfo = "wasauchimmer" } diff --git a/lieder/vorlage_satz/vorlage_satz.ly b/lieder/vorlage_satz/vorlage_satz.ly index 6b1252a..d5dd99e 100644 --- a/lieder/vorlage_satz/vorlage_satz.ly +++ b/lieder/vorlage_satz/vorlage_satz.ly @@ -6,8 +6,8 @@ HEADER = \bookpart { \header { title = "Chorsatz" alttitle = "" - poetId = #'dude - composerId = #'dude + composerId = "dude" + songId = "a-song-id" categories = "" songinfo = "" } diff --git a/lilypond-common-includes b/lilypond-common-includes index c20d032..7a0dd88 160000 --- a/lilypond-common-includes +++ b/lilypond-common-includes @@ -1 +1 @@ -Subproject commit c20d0327e792d04666ee163eb9b2a730853a3d5a +Subproject commit 7a0dd880677296b69e80c350f7be451ed2e37a91 diff --git a/lilypond-custom-includes/authors.ly b/lilypond-custom-includes/authors.ly deleted file mode 100644 index 14f1cfb..0000000 --- a/lilypond-custom-includes/authors.ly +++ /dev/null @@ -1,16 +0,0 @@ -AUTHORS = #'( - (dude . ( - (name . "Krasser Dude") - (trail_name . "dud") - (birth_year . "1950") - ;(death_year . "2050") - (organization . "Bund der krassen Dudes") - )) - (kumpel . ( - (name . "Krasser Kumpel") - (trail_name . "dudekumpel") - ;(birth_year . "1960") - (death_year . "2050") - (organization . "Bund der krassen Kumpels") - )) -) \ No newline at end of file diff --git a/lilypond-custom-includes/base_config.ly b/lilypond-custom-includes/base_config.ly index 5dfa274..4730846 100644 --- a/lilypond-custom-includes/base_config.ly +++ b/lilypond-custom-includes/base_config.ly @@ -3,6 +3,7 @@ defaultSongStyle = #'börnel customStyleOverridesFile = "../lilypond-custom-includes/custom_style_overrides.ly" -\include "authors.ly" \include "categories.ly" -\include "../lilypond-common-includes/general_include.ly" \ No newline at end of file +\include "../lilypond-common-includes/general_include.ly" +AUTHOR_DATA = #(call-with-input-file "../../data/authors.json" json->scm) +SONG_DATA = #(call-with-input-file "../../data/songs.json" json->scm)