From 61f3a91f22ede8397d24bdb780f0e47836f3edb0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 6 Nov 2023 18:16:07 +0100 Subject: Makefile & post-process neu --- CIS/Makefile | 7 +++++++ CIS/post-process | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 CIS/Makefile create mode 100755 CIS/post-process diff --git a/CIS/Makefile b/CIS/Makefile new file mode 100644 index 0000000..c8c5ec1 --- /dev/null +++ b/CIS/Makefile @@ -0,0 +1,7 @@ +%.ly: %.mxl + musicxml2ly $< + ./post-process "$@" + +%.ly: %.xml + musicxml2ly $< + ./post-process "$@" diff --git a/CIS/post-process b/CIS/post-process new file mode 100755 index 0000000..ffe744b --- /dev/null +++ b/CIS/post-process @@ -0,0 +1,28 @@ +#!/bin/sh + +sed ' + s@\s\+\\\(barNumberCheck\|numericTimeSignature\|stemDown\|stemUp\)\b@@g; + s@\bb\([0-9]*\)\b@h\1@g; + s@\bbes\([0-9]*\)\b@b\1@g; + s@\[@@g; + s@]@@g; + s@\s*[#%]\s*[0-9]\+\s*$@@g; + s@\s\+~@~@g; + s@\\bar@| \0@g; + s@\(\S\)\s\+@\1 @g; +' "$1" \ +| sed ' + /|/! { + :a + N + /|/ { + s@\n@ @g + b + } + /}/! ba + } +' \ +| sed ' + s@\(\S\)\s\+@\1 @g; +' \ +| sponge "$1" -- cgit v1.2.3-54-g00ecf