View Single Post
Old 03-18-2021, 09:52 AM   #1
nhedgehog
Guru
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: 802
Karma: 628976
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