commit f2f44b620cc01594873e1daf0e4f8c1c77416cf3 parent 05cc8332e0ca72ac9d5d602f33d21c5d8c69d2d5 Author: hhvn <dev@hhvn.uk> Date: Mon, 19 Sep 2022 16:00:25 +0100 Fix issue with capitalized tags in tag/fileformat Diffstat:
M | .scripts/tag/fileformat | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.scripts/tag/fileformat b/.scripts/tag/fileformat @@ -10,8 +10,8 @@ fn sigexit { tmp = /tmp/$pid.tags for (f in $*) { tag/get $f > $tmp - track = `$nl{grep '^track:' < $tmp | sed 's/^track: 0*//;s~/.*$~~'} - title = `$nl{grep '^title:' < $tmp | sed 's/^title: //'} + track = `$nl{grep -i '^track:' < $tmp | sed 's/^[^ ]*: 0*//;s~/.*$~~'} + title = `$nl{grep -i '^title:' < $tmp | sed 's/^[^ ]*: //' | tr / '&'} ext = `$nl{echo $f | sed 's/.*\.//' | tr '[:upper:]' '[:lower:]'} dir = `$nl{dirname $f} printf '%s/%02d %s.%s\n' $dir $track $title $ext