diff options
author | Erich Eckner <git@eckner.net> | 2019-09-19 22:53:55 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-19 22:53:55 +0200 |
commit | c20aa8630d908aece2d7736e87f71810e3d91fba (patch) | |
tree | 67f450f125b217db47a5ad26c0c000d1b91a4537 /Konzerte | |
parent | f764641a87feb90872cfb7970dda5b04904b9f99 (diff) | |
download | Musik-c20aa8630d908aece2d7736e87f71810e3d91fba.tar.xz |
Konzerte/2019_09_29 neu
Diffstat (limited to 'Konzerte')
-rw-r--r-- | Konzerte/2019_09_29/alles.ly | 8 | ||||
-rwxr-xr-x | Konzerte/2019_09_29/make | 88 |
2 files changed, 96 insertions, 0 deletions
diff --git a/Konzerte/2019_09_29/alles.ly b/Konzerte/2019_09_29/alles.ly new file mode 100644 index 0000000..bbabb04 --- /dev/null +++ b/Konzerte/2019_09_29/alles.ly @@ -0,0 +1,8 @@ +\version "2.19.80" +\paper { + first-page-number = #1 + print-first-page-number = ##t +} + +%LOOP%\include "../../%TEIL%/%TEIL-BASE%.pre" +%LOOP%\pageBreak diff --git a/Konzerte/2019_09_29/make b/Konzerte/2019_09_29/make new file mode 100755 index 0000000..a4478ee --- /dev/null +++ b/Konzerte/2019_09_29/make @@ -0,0 +1,88 @@ +#!/bin/bash + +set -e + +cd "$(dirname "$0")" + +teile_params=( + 'Den_Tag_an_dem_wir_feiern_segne_Gott' + 'Denn_er_hat_seinen_Engeln_' + 'Kanons/Er_ist_wie_ein_Baum' +) + +rm -f *.pre + +for teil_params in "${teile_params[@]}" +do + if [ -z "${teil_params%%'"'*}" ]; then + continue + fi + 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_param in "${teile_params[@]}" + do + teil="${teil_param%%:*}" + echo "${loopLines}" | \ + if [ -z ${teil%%'"'*} ]; then + sed ' + s/\\include "[^"]*"/\\markup { '"${teil_param}"'" }/g + ' + else + cat + fi | \ + 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 |