View Single Post
Old 10-12-2021, 05:58 PM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,737
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by FrankJH View Post
I guess one has to use a database ... but is this possible within an epub?
I think we have to use Javascript for these purposes ... but maybe I'm wrong
I experimented with this some time ago and found out that it's theoretically possible to embed a sqlite database in an epub and query it using a sqlite JavaScript library.
If you open my proof-of-concept epub3 file with Calibre Editor or Apple Books you should get single-word German definitions, if you click on book, house or mouse in the second paragraph.
However, if you look at the source files, you'll notice that the size of the 6 word demo database is already 164KB, which makes this approach impractical.

BTW, there's an IDPF dictionary proposal that nobody seems to be interested in.

You might want to look into creating Stardict dictionaries. They're supported by many Android epub apps and KOReader.

You could also simply convert your epubs to Kindle books and read them with one of the free Kindle apps, which come with excellent free dictionaries.

(You could also convert HTML source files (with custom markup) to Kindle dictionaries with KindleGen.)
Attached Files
File Type: epub Click_test_epub3.epub (412.2 KB, 542 views)
Doitsu is offline   Reply With Quote