From cfb0a6e4100ce03a077cd505fb94736dc91ea8db Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 19 Jul 2024 11:44:42 +0200 Subject: improve CIS conversion --- CIS/Makefile | 11 +++++++++-- CIS/post-process | 16 ++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) (limited to 'CIS') diff --git a/CIS/Makefile b/CIS/Makefile index c8c5ec1..3b9af8b 100644 --- a/CIS/Makefile +++ b/CIS/Makefile @@ -1,7 +1,14 @@ +%.musicxml: %.capx + mscore "$<" -o "$@" + +%.ly: %.musicxml + musicxml2ly "$<" + ./post-process "$@" + %.ly: %.mxl - musicxml2ly $< + musicxml2ly "$<" ./post-process "$@" %.ly: %.xml - musicxml2ly $< + musicxml2ly "$<" ./post-process "$@" diff --git a/CIS/post-process b/CIS/post-process index ffe744b..459a98a 100755 --- a/CIS/post-process +++ b/CIS/post-process @@ -10,8 +10,9 @@ sed ' s@\s\+~@~@g; s@\\bar@| \0@g; s@\(\S\)\s\+@\1 @g; -' "$1" \ -| sed ' +' -i "$1" + +sed ' /|/! { :a N @@ -21,8 +22,11 @@ sed ' } /}/! ba } -' \ -| sed ' +' -i "$1" + +sed ' s@\(\S\)\s\+@\1 @g; -' \ -| sponge "$1" + s@\s$@@ +' -i "$1" + +rm "$1~" -- cgit v1.2.3-70-g09d2