ref: 467c95b4a879f5f72c7bca2c541680269db18c92
parent: 498e9e7d838e7c02e8387f853cc5fe0a22349124
author: rodri <rgl@antares-labs.eu>
date: Sun Jul 17 10:10:31 EDT 2022
/lib/ktrans: added tools to fetch skk dicts and convert them to ktrans jishos
--- /dev/null
+++ b/lib/ktrans/README
@@ -1,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
--- /dev/null
+++ b/lib/ktrans/grabskkdicts
@@ -1,0 +1,2 @@
+#!/bin/rc
+git/clone https://github.com/skk-dev/dict skkdicts
--- /dev/null
+++ b/lib/ktrans/skk2ktrans
@@ -1,0 +1,2 @@
+#!/bin/rc
+tcs -sf jis | awk '$1 !~ /;;/ {gsub("(^\/|\/$)", "", $2); gsub(" ", " "); gsub("\/", " ", $2);} {print}'