Hy dictionary support for Plover.
Download the latest version of Plover for your operating system from the releases page. Only versions 4.0.0.dev1 and higher are supported.
- Open Plover
- Navigate to the Plugin Manager tool
- Select the "plover-hy-dictionary" plugin entry in the list
- Click install
- Restart Plover
The same method can be used for updating and uninstalling the plugin.
This plugin is based on the Plover Python Dictionary plugin so you can reference its documentation.
The main example directly translated to hy for this plugin:
(setv *longest-key* 2)
(setv *show-stroke-steno* "STR*")
(defn lookup [strokes]
"
Get the translation that the provided strokes would output.
:param strokes: A tuple of strokes to look up translations for.
:return: The translation. A KeyError will be thrown if the lookup failed.
"
(assert (<= (len strokes) *longest-key*) (% "%d/%d" ((len strokes) *longest-key*)))
(if (!= *show-stroke-steno* (nth strokes 0))
(raise KeyError))
(if (= (len strokes) 1)
" "
(nth strokes 1)))
(defn reverse-lookup [text]
"
Get the strokes that would result in the provided text.
:param text: The text to look up strokes for.
:return: An array of stroke tuples. An empty array if the reverse lookup failed.
"
[])