summaryrefslogtreecommitdiff
path: root/CIS/post-process
diff options
context:
space:
mode:
Diffstat (limited to 'CIS/post-process')
-rwxr-xr-xCIS/post-process28
1 files changed, 28 insertions, 0 deletions
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"