Epwing integrated inside Anki?

I was thinking about doing a plugin which does the following:

1) given a sentence, the user selects a word;
2) once the word is selected, the user press a button;
3) the plugin deconjugate the word and search it inside an Epwing dictionary;
4) if found, it adds the definition inside another field;

I need this because I have a lot of mined sentences, to use for cloze-deletion, but I don't have a "word" field, so I need to add every definition by hand for every word that I'm going to cloze-delete.

With this plugin, as I select the word to cloze-delete it, I would easily add a definition too for that same word.

Problem is that I know nothing about Anki plugins, so if you have a guide/tutorial/anything to suggest, it would be great Smile

Also what do you think would be the best way to read the Epwing format? I've seen that software like Epwing2Anki use an external (third party) exe but I don't know it this is feasible inside Anki.

But I have txt versions of epwing dictionaries too, so it wouldn't be hard to map them inside a sqlite db.
Edited: 2016-12-28, 2:57 pm