Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 03-18-2021, 09:52 AM   #1
nhedgehog
Fanatic
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
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
i get:

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>
Since this is shown only as Plaintext I thought, following the discussion on GIHUB:
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/>', '&nbsp;<div></div>')
    return html
end
but that didn't help either.
What went wrong, where is my error? Please help.
nhedgehog is offline   Reply With Quote
Old 03-18-2021, 04:23 PM   #2
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
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).
Frenzie is offline   Reply With Quote
Old 03-18-2021, 05:08 PM   #3
nhedgehog
Fanatic
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
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.
nhedgehog is offline   Reply With Quote
Reply

Tags
dictionary, koreader, pocketbook, stardict

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:17 PM.


MobileRead.com is a privately owned, operated and funded community.