diff options
Diffstat (limited to 'tools/clean-diff')
-rwxr-xr-x | tools/clean-diff | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/clean-diff b/tools/clean-diff new file mode 100755 index 0000000..4600702 --- /dev/null +++ b/tools/clean-diff @@ -0,0 +1,11 @@ +#!/bin/sh +sed '/^+[^+]/!s/ /TaBBaT/g' |\ + expand -t $(seq -s , 9 8 200) |\ + sed 's/TaBBaT/ /g' |\ + sed '/^+[^+]/s/ * $//' |\ + tr -d '\015' |\ + tr '\n' '°' |\ + sed 's/\(@@[^@]*@@°[^@]*\)/\n\1/g' |\ + egrep -v '@@[^@]*@@°(( [^°]*°)|([+-][[:space:]]*°)|(-[[:space:]]*([^°]*)°\+[[:space:]]*\5°))*$' |\ + tr -d '\n' |\ + tr '°' '\n' |