diff options
author | rtz12 <koenig@fagott.pw> | 2016-11-15 17:29:02 (UTC) |
---|---|---|
committer | rtz12 <koenig@fagott.pw> | 2016-11-15 17:29:02 (UTC) |
commit | 0ad174d7329e02b3f644614de0758789bb3677d4 (patch) | |
tree | e49a659c0b89bdec07cde778850b7fe002ac27ea /bin/generate-confusables | |
parent | e02ad854383265db216ed92b10c4f12408999d6a (diff) |
Verrückter Anilist Import
Bestes Feature 2k16.
Hashtag Make Grilist Great Again.
Diffstat (limited to 'bin/generate-confusables')
-rwxr-xr-x | bin/generate-confusables | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/generate-confusables b/bin/generate-confusables new file mode 100755 index 0000000..a90fc38 --- /dev/null +++ b/bin/generate-confusables | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/bin/bash | ||
2 | echo 'package util | ||
3 | /* | ||
4 | * THIS FILE IS AUTOGENERATED | ||
5 | * DO NOT EDIT MANUALLY!!! | ||
6 | */ | ||
7 | |||
8 | var unicodeConfusables = map[rune][]rune{' | ||
9 | sed 's/#.*$//' | sed 's/;//g' | grep -e '\w' |\ | ||
10 | while IFS=$'\t' read -r -a line | ||
11 | do | ||
12 | key=$(sed 's/ $//' <<<"${line[0]}") | ||
13 | value=$(sed 's/ $//' <<<"${line[1]}" | sed 's/ /, 0x/g') | ||
14 | echo " 0x$key: []rune{0x$value}," | ||
15 | done | ||
16 | echo '}' | ||
17 | |||