While I was playing with QT, I realised that I use Dict from console often,
and a more readable output would be nice. I know that there are plenty of GUIs
for Dict out there already (even under the name of qdict!), but for a QT
sandbox, this seemed fine.
The main difficulty is to parse the output of Dict with regular expressions.
I decided to parse it line-by-line which makes difficult to decide where does
a sublist or a quotation end for example. Unfortunatelly the formatting of Dict
heavily relies on the number of spaces before each line.
There are some basic unit tests for the parsing functions, since qdict,
without the GUI, is more or less a bunch of functions around QRegExp objects.
Compile & run:
qdict needs dict and the gcide DB. At gentoo it's app-dicts/dictd-web1913, and dict-gcide under ubuntu.
No definitions found
Different search strategies