summaryrefslogtreecommitdiff
path: root/Konzerte/2020_01_05
diff options
context:
space:
mode:
Diffstat (limited to 'Konzerte/2020_01_05')
-rw-r--r--Konzerte/2020_01_05/Makefile36
-rw-r--r--Konzerte/2020_01_05/alles.ly17
-rwxr-xr-xKonzerte/2020_01_05/mangle-inputs78
3 files changed, 131 insertions, 0 deletions
diff --git a/Konzerte/2020_01_05/Makefile b/Konzerte/2020_01_05/Makefile
new file mode 100644
index 0000000..e43f84f
--- /dev/null
+++ b/Konzerte/2020_01_05/Makefile
@@ -0,0 +1,36 @@
+alles.pdf: \
+ alles.ly \
+ Als_die_Welt_verloren.pre \
+ Magnificat.pre \
+ Stern_ueber_Bethlehem_.pre \
+ Freut_euch_von_Herzen.pre \
+ Die_Botschaft.pre \
+ Drei_Koenige_wandern.pre \
+ Freu_dich_Erd_und_Sternenzelt.pre \
+ Freu_dich_Erd_und_Sternenzelt_satz.pre \
+ Freu_dich_Erd_und_Sternenzelt_stimmen.pre \
+ Freu_dich_Erd_und_Sternenzelt_texte.pre \
+ Es_ist_ein_Ros_entsprungen.pre \
+ Es_ist_ein_Ros_entsprungen_satz.pre \
+ Es_ist_ein_Ros_entsprungen_stimmen.pre \
+ Es_ist_ein_Ros_entsprungen_texte.pre \
+ O_du_froehliche.pre \
+ Lobsinget_Gott_dem_Herrn.pre
+ lilypond alles.ly
+ pkill -SIGHUP -xf 'mupdf alles.pdf'
+
+%_satz.pre: ../../%/satz.ly mangle-inputs
+ ./mangle-inputs "$<" >$@
+
+%_stimmen.pre: ../../%/stimmen.ly mangle-inputs
+ ./mangle-inputs "$<" >$@
+
+%_texte.pre: ../../%/texte.ly mangle-inputs
+ ./mangle-inputs "$<" >$@
+
+.SECONDEXPANSION:
+
+%.pre: ../../$$*/$$*.ly mangle-inputs
+ ./mangle-inputs "$<" >$@
+
+.SECONDARY:
diff --git a/Konzerte/2020_01_05/alles.ly b/Konzerte/2020_01_05/alles.ly
new file mode 100644
index 0000000..431a340
--- /dev/null
+++ b/Konzerte/2020_01_05/alles.ly
@@ -0,0 +1,17 @@
+\version "2.19.80"
+\paper {
+ print-first-page-number = ##t
+}
+
+#(set-global-staff-size 14)
+
+\include "Als_die_Welt_verloren.pre"
+\include "Magnificat.pre"
+\include "Stern_ueber_Bethlehem_.pre"
+\include "Freut_euch_von_Herzen.pre"
+\include "Die_Botschaft.pre"
+\include "Drei_Koenige_wandern.pre"
+\include "Freu_dich_Erd_und_Sternenzelt.pre"
+\include "Es_ist_ein_Ros_entsprungen.pre"
+\include "O_du_froehliche.pre"
+\include "Lobsinget_Gott_dem_Herrn.pre"
diff --git a/Konzerte/2020_01_05/mangle-inputs b/Konzerte/2020_01_05/mangle-inputs
new file mode 100755
index 0000000..6c4ac50
--- /dev/null
+++ b/Konzerte/2020_01_05/mangle-inputs
@@ -0,0 +1,78 @@
+#!/bin/bash
+
+if [ -z "$1" ]; then
+ >&2 echo 'too few arguments'
+ exit 1
+fi
+
+Groeszen='
+Es_kommt_ein_Schiff_geladen:19
+Macht_hoch_die_Tuer:18
+Freuet_euch_allezeit:17
+Lobsinget_Gott_dem_Herrn:17
+Stern_ueber_Bethlehem_:20
+Freut_euch_von_Herzen:18
+Drei_Koenige_wandern:17
+Als_die_Welt_verloren:17
+Die_Nacht_ist_vorgedrungen:18
+Das_grosze_Wunder_hat_ganz_klein_begonnen:17.5
+'
+
+if printf '%s\n' "$1" \
+| grep -q '/\([^/]\+\)/\1\.ly$'; then
+
+ base="${1%/*.ly}"
+
+ sed '
+ s@\(include "\)\(\(artikulation\|satz\|stimmen\|texte\)\.ly"\)@\1'"${base}"'/\2@
+ t
+ s@\(include "\)\(\(artikulation\|satz\|stimmen\|texte\)\.pre"\)@\1'"${base##*/}"'_\2@
+ ' \
+ <"$1" \
+ | case "${base##*/}" in
+ 'O_du_froehliche')
+ sed '
+ s/%Oberstimme%//g
+ '
+ ;;
+ *)
+ cat
+ ;;
+ esac \
+ | if Groesze=$(
+ printf '%s\n' "${Groeszen}" \
+ | grep "^${base##*/}:"
+ ); then
+ sed '
+ /^\s*\\layout\s\+{\s*$/ a #(layout-set-staff-size '"${Groesze#*:}"')
+ '
+ else
+ cat
+ fi
+
+elif [ -z "${1##*/Freu_dich_Erd_und_Sternenzelt/stimmen.ly}" ] \
+|| [ -z "${1##*/Freu_dich_Erd_und_Sternenzelt/texte.ly}" ]; then
+
+ cat "$1"
+
+elif [ -z "${1##*/Es_ist_ein_Ros_entsprungen/satz.ly}" ] \
+|| [ -z "${1##*/Es_ist_ein_Ros_entsprungen/stimmen.ly}" ] \
+|| [ -z "${1##*/Es_ist_ein_Ros_entsprungen/texte.ly}" ]; then
+
+ sed '
+ s/%STR_[1-3]%//
+ s/%Variante_2%//
+ ' "$1"
+
+elif [ -z "${1##*/Freu_dich_Erd_und_Sternenzelt/satz.ly}" ]; then
+
+ sed '
+ s/%STR_[124]%//
+ ' "$1"
+
+else
+
+ >&2 printf 'unknown input "%s"\n' "$1"
+ exit 1
+
+fi