![]() |
#1 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 551
Karma: 386744
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
|
Dictionary postformating - help needed
Using KoReader on a Pocketbook, I tried to force it to show some formatting.
Allready done: set sametypesequence=h in wiki.ifo file with: Code:
/mnt/ext1/applications/koreader # ./sdcv -02 data/dict Zwickel Code:
g_mkdir failed: No such file or directory Found 1 item, similar to Zwickel. -->De-De (Wiktionary) -->Zwickel <i>Substantiv, m</i><i>, Zwi·ckel, Pl. Zwi·ckel</i><br><b>Bedeutungen:</b><br>1. Architektur: eine dreiseitig begrenzte, ebene oder sphärische Fläche<br>2. Schneiderei: ein keilförmiger Einsatz an Kleidungsstücken<br>3. regional: ein sonderbarer oder seltsamer Mensch<br>4. regional: spezieller Zapfhahn zur Verprobung des Jungbieres<br><b>Synonyme:</b><br>2. Gehre<br>3. Sonderling<br> https://github.com/koreader/koreader/pull/3573 I could force KoReader to change some of the Dictrionary html code on the fly by putting a wiki.lua file in the same folder where the dictionary is located and the wiki.ifo file can be found with the following code: Code:
return function(html) html = html:gsub('<b>', '<span style="font-weight: bold; font-size: 1.1em">') html = html:gsub('</b>', '</span>') html = html:gsub('<i>', '<span style="font-style: italic; font-size: 0.9em ">') html = html:gsub('</i>', '</span>') html = html:gsub('<br/>', ' <div></div>') return html end What went wrong, where is my error? Please help. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,190
Karma: 448558
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
I don't see <br> in there, so you should try html = html:gsub("<br>", "<br/>") (and look at the error log).
|
![]() |
![]() |
![]() |
#3 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 551
Karma: 386744
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
|
Thanks for the help. So strange: now its working!
Before I had only plaintext dictionary entries showing, but changes I made in the Dic name of the ifo file didn't show up. In the meantime the device switched off and now every dictionary I created with html entries does show them instead of the plaintext it showed before, even without the lua files. So my guess now is, my changes in the ifo files "sametypesequence=h" needed a reboot, even then I thought, that switching to mass storage mode and restart KoReader would force it to use the new ifo file. I'm a very happy user now. |
![]() |
![]() |
![]() |
Tags |
dictionary, koreader, pocketbook, stardict |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Converting an AZW dictionary to MOBI = no longer treated as a dictionary by Kindle | beic | Conversion | 3 | 08-02-2016 10:10 AM |
[HELP NEEDED] Custom Dictionary. | antkiller23 | PocketBook | 12 | 10-23-2013 04:48 PM |
Dictionary question: changing word delimiters for french dictionary | oecherprinte | Amazon Kindle | 1 | 05-09-2011 04:45 AM |
Oxford built-in dictionary disappears after changing default dictionary | YYZscientist | Amazon Kindle | 4 | 01-24-2010 08:42 PM |