Lookup the Cangjie encoding for a given Han character.
cangjie.el is available on MELPA.
(use-package cangjie)(straight-use-package 'cangjie)Put cangjie.el under your load-path, then (require 'cangjie) in your init file.
cangjie-at-point: Lookup Cangjie encoding for character at point.cangjie (CHARACTER): Lookup Cangjie encoding for CHARACTER (asked in prompt when called interactively).
cangjie-source: the dictionary to be used by cangjie.
Its value can be:
- a path,
which makes
cangjieread from that path if it's a valid RIME dictionary. 'rime, to download the dictionary from https://github.com/rime/rime-cangjie, and save it for future use.wiktionary-raw, to output the line with the Cangjie code on the character's Wiktionary page,'wiktionary, or anything else, to grep the Wiktionary page like'wiktionary-raw, then try to remove the markup in the result, leaving just the Cangjie code.
This is the first standalone Emacs package I've written, so I needed some directions.
emacs-powerthesaurus and
define-word served as really good references
for me to follow.
I'm using the Cangjie dictionary from RIME, rime-cangjie.