diff options
author | Erich Eckner <git@eckner.net> | 2019-05-02 22:19:36 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-02 22:19:36 +0200 |
commit | ec71a849159d114a97a36d217e79dcd97d8aeeed (patch) | |
tree | 9404653dbc1671a2bd681e6608d162a1597faa61 /Konzerte/2019_05_05 | |
parent | 2f48123ea3ffe951a97d799ec1025a78ef9c20d4 (diff) | |
download | Musik-ec71a849159d114a97a36d217e79dcd97d8aeeed.tar.xz |
Konzerte/2019_05_05/ neu
Diffstat (limited to 'Konzerte/2019_05_05')
-rw-r--r-- | Konzerte/2019_05_05/alles.ly | 10 | ||||
-rwxr-xr-x | Konzerte/2019_05_05/make | 84 |
2 files changed, 94 insertions, 0 deletions
diff --git a/Konzerte/2019_05_05/alles.ly b/Konzerte/2019_05_05/alles.ly new file mode 100644 index 0000000..2c7352c --- /dev/null +++ b/Konzerte/2019_05_05/alles.ly @@ -0,0 +1,10 @@ +\version "2.19.80" +\paper { +% first-page-number = #2 + print-first-page-number = ##t +} + +%LOOP%\include "../../%TEIL%/%TEIL-BASE%.pre" +% LOOP%%IF '%TEIL-BASE%'='Freude_grosze_Freude'%\pageBreak +% LOOP%%IF '%TEIL-BASE%'='Ich_steh_an_deiner_Krippen_hier_'%\pageBreak +% LOOP%%IF '%TEIL-BASE%'='Froehlich_soll_mein_Herze_springen_kombiniert_E_dur'%\pageBreak diff --git a/Konzerte/2019_05_05/make b/Konzerte/2019_05_05/make new file mode 100755 index 0000000..067fed2 --- /dev/null +++ b/Konzerte/2019_05_05/make @@ -0,0 +1,84 @@ +#!/bin/bash + +set -e + +cd "$(dirname "$0")" + +teile_params=( + Cantate_Domino + 'Morgenlicht_leuchtet:STROPHEN="[1-3]"' + Er_ist_mein_Hirt + 'Ich_moecht_dass_einer_mit_mir_geht:STROPHEN="[1-4]"' + 'Komm_Heilger_Geist:STROPHEN="[1-2]"' + Denn_er_hat_seinen_Engeln_ + 'Kommt_mit_Gaben_und_Lobgesang:STROPHEN="[1-3]"' + Tretet_her_zum_Tisch_des_Herrn + + 'Bewahre_uns_Gott:STROPHEN="4"' +) + +rm -f *.pre + +for teil_params in "${teile_params[@]}" +do + teil="${teil_params%%:*}" + params="${teil_params#${teil}}" + params="${params#:}" + ( + cd ../../${teil} + sed -n ' + s/^\([^:]*%\|'"${teil##*/}"'\)\.pdf.*:\s*// + T + :a + /\\$/ { + N + s/\\\n/ / + ta + } + s/\n.*$// + s/%/'"${teil##*/}"'/g + p + ' Makefile | \ + tr ' ' '\n' | \ + grep '\.pre$' | \ + xargs -r make ${params} "$@" + ) +done + +{ + printf '\n\n' + cat alles.ly + printf '\n\n' +} | \ + while read -r line + do + if [[ "${line}" = '%LOOP%'* ]] + then + loopLines="${loopLines} +${line#%LOOP%}" + else + if [ -n "${loopLines}" ] + then + for teil in "${teile_params[@]%%:*}" + do + echo "${loopLines}" | \ + sed " + s|%TEIL%|${teil}|g + s|%TEIL-BASE%|${teil##*/}|g + /%IF \([^=%]\+\)!=\1%/d + s|%IF [^=%]\+!=[^=%]\+%||g + s|%IF \([^=%]*[^=!%]\)=\1%||g + /%IF [^=%]\+=[^=%]\+%/d + " + done + unset loopLines + fi + echo "${line}" + fi + done > alles.pre + +lilypond alles.pre + +#ps2pdf -sPAPERSIZE=a4 - empty.pdf </dev/null +#pdfunite empty.pdf alles.pdf alles_.pdf +#mv alles_.pdf alles.pdf |