diff --git a/lib/ktrans/README b/lib/ktrans/README new file mode 100644 index 000000000..bcc40b5a0 --- /dev/null +++ b/lib/ktrans/README @@ -0,0 +1,12 @@ +# +# The following are a set of tools to obtain and process dictionaries from the SKK project in order to use them with ktrans(1). +# +# grabskkdicts pulls the skk kana-kanji conversion dictionaries from the skk-dev/dict repo. +# skk2ktrans takes an skk dictionary and converts it into a kanji jisho suitable to be used with ktrans(1). +# +# You can fetch and convert all the dictionaries by running this file. +# + +grabskkdicts +for(d in skkdicts/SKK-JISYO.*) + <$d skk2ktrans >$d.jisho diff --git a/lib/ktrans/grabskkdicts b/lib/ktrans/grabskkdicts new file mode 100755 index 000000000..3ce0bfb6d --- /dev/null +++ b/lib/ktrans/grabskkdicts @@ -0,0 +1,2 @@ +#!/bin/rc +git/clone https://github.com/skk-dev/dict skkdicts diff --git a/lib/ktrans/skk2ktrans b/lib/ktrans/skk2ktrans new file mode 100755 index 000000000..94da097fa --- /dev/null +++ b/lib/ktrans/skk2ktrans @@ -0,0 +1,2 @@ +#!/bin/rc +tcs -sf jis | awk '$1 !~ /;;/ {gsub("(^\/|\/$)", "", $2); gsub(" ", " "); gsub("\/", " ", $2);} {print}'