kobo_jp_dict
kobo_jp_dict copied to clipboard
Split dictionary generation code out into its own crate.
The code for generating the final dictionary may be useful to more projects than just this one, especially if we make it non-language-specific. The resulting crate would likely be pretty straightforward, API-wise. It would just take a list (or iterator) of ([terms], definition) pairs and a Writer, and write the dictionary out.
The terms part of the pair should be a list of some kind, so that all the conjugations of a word can be included as search terms. The definition part would simply be a big String containing the html of the entry that gets displayed to the user.