View Single Post
Old 12-08-2012, 01:49 PM   #132
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 595
Karma: 1281565
Join Date: Dec 2011
Location: Padova, Italy
Device: Kindle3, Odyssey, eDGe, A60, PRS-T1, iPad3, KoboGlo
Hi all,

I implemented the output to Kobo format into Penelope, my dictionary-converter tool.

Source code: http://code.google.com/p/penelope-dictionary-converter/
Doc/explanation: http://www.albertopettarin.it/penelope.html

Note that you will probably need Python 2.6+ (not Python 3.x) to run it.

Example:
Code:
$ python penelope.py --output-kobo -p bar -f en -t it
Create English-to-Italian dictionary in Kobo format (dicthtml-en-it.zip), from StarDict files bar.*

Example 2:
Code:
$ python penelope.py --xml --output-kobo -p bar -f en -t en
Create English dictionary in Kobo format (dicthtml.zip), from XML file bar.xml

===

NOTE 1: probably the management of 11.html entries is not completely correct right now. At the moment every key NOT starting as [a-z][a-z] (when lowercased) will go to 11.html. Better ideas?

NOTE 2: you will need to modify MARISA_BUILD_PATH in penelope.py, pointing it to the directory containing a working build of MARISA.

Last edited by AlPe; 12-08-2012 at 02:03 PM.
AlPe is offline   Reply With Quote