readings_index scripts updated to last state

This commit is contained in:
2021-02-12 19:22:38 +01:00
parent 12807cfce1
commit 4c989d7cb4
4 changed files with 3821 additions and 3 deletions

12
readings_index/formatter Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
counter=0
for i in {1..3000}; do
readings="$(grep -P "^$i\t" readings_index | cut -f3 | sed 's/^/L-/' | tr '\n' ',' | sed 's/,$/\n/; s/,/, /g')"
if [ -z "$readings" ]; then
(( counter++ ))
summary="$(printf "missing reading for Kanji no:%s\n%s" "$i" "$summary")"
fi
printf '%s\t%s\n' "$i" "$readings"
done
echo "$summary"
printf 'Kanjis without readings index: %d\n' "$counter"