Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-14-2013, 12:51 PM   #196
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by clsdclsd View Post
I just wanted to say that the highlight-not-working issue solved for me when I put the js in the book.
clsdclsd,
this is interesting stuff. Could you please provide me with a test file that demonstrates this?
tshering is offline   Reply With Quote
Old 04-14-2013, 02:52 PM   #197
clsdclsd
Zealot
clsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five words
 
Posts: 105
Karma: 37668
Join Date: Feb 2012
Device: Kobo Touch
Quote:
Originally Posted by jgoguen View Post
I believe that would put the modified book into your library, not sure how else it could have happened. Maybe you added a book that had already been modified.
Somehow I've copied the books back with Calibre, but I cant remember when and how, and obviously it was unintentional. If I try to do it ("Add books to your Calibre library from the connected device") only one unrecognizable and unreadable file is transferred.
Anyway, a few hours of RegEx search&replace solved this :-). This was another lesson of the importance of backing up...
clsdclsd is offline   Reply With Quote
Old 04-14-2013, 03:02 PM   #198
clsdclsd
Zealot
clsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five wordsclsdclsd can name that ebook in five words
 
Posts: 105
Karma: 37668
Join Date: Feb 2012
Device: Kobo Touch
friedmandu, tshering: I'm sorry, I just tried to put javascript to an another book, without success, so it seems that this method not works all the time. I can't share with you the book which was this worked on (or describe the procedure in details), but if you send me a file which has highlighting problems, I could try to cure that to see whether its working or not.
clsdclsd is offline   Reply With Quote
Old 04-14-2013, 05:46 PM   #199
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by clsdclsd View Post
I can't share with you the book which was this worked on (or describe the procedure in details), but if you send me a file which has highlighting problems, I could try to cure that to see whether its working or not.
Actually, I do not have a kepub file with highlighting problems right now. Up to now I was able to find in each kepub that did not work as expected a way to make it work (most time I had to put each part that is referred to in the TOC into a separate file, or to change the file name, or put more kobo-tags into the files). Because of this and since I did not notice any improvement by adding the js file, I doubted whether the js file has any effect on reading the kepub on the Touch/Glo/Mini. Therefore I was curious to see your kepub and in which situations the js file improves its function.
Anyway, thank you for your offer to help.
tshering is offline   Reply With Quote
Old 04-14-2013, 05:54 PM   #200
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,061
Karma: 2178845
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
What other Kobo tags did you have to add? Maybe it's something I can build in to the plugin?
jgoguen is offline   Reply With Quote
Old 04-14-2013, 06:06 PM   #201
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by friedmandu View Post
Could you help me a little with the procedure?
1) Do I merely take the kobo.js from another book and stick it into the book I'd like to enable for highlighting?
2) If I take the kobo.js from another book, there will be a lot of script already in the file (which to me is mostly gibberish). Is there any likelihood I can just apply that script to the target book as well?
3) And finally, how do I "reference it in the htmls"?
I hope this is not too difficult too explain. Thanks.
As a law-abiding citizen I would never dare to answer questions 1 and 2 with yes.
As for question 3, I take it to be a simple question on how to reference js files in general. You my google for it or have a look here
tshering is offline   Reply With Quote
Old 04-15-2013, 04:22 AM   #202
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by jgoguen View Post
What other Kobo tags did you have to add? Maybe it's something I can build in to the plugin?
Sorry, I meant to say "further kobo id span tags (span id="kobo.1.1" and so on)." For instance, if a chapter is so long that it results in a certain screen page having no opening kobo span tag and you happen to close the book on this screen page, the book will not reopen at the correct screen page. As you might have noticed. in the preview kepubs from Kobo (and I therefore suppose also in the regular Kobo kepubs), they put a kobo span tag also in between sentences (with increasing second index number); in some books they additionally match each font attribute tag with a kobo span tag. Since the screen page breaks are depending on customizable values like font attributes, margins and so on, even those measures (namely, further kobo span tags) will not prevent kobo-span-tag-less screen pages in every possible case, or one will end finally putting kobo tags around each single letter.

The other problem I had was with ranges of text that were not at all covered by kobo span tags, as for instance tables and lists. This was of course my fault, since I did not think of those case at all to start with.

I do not know about your plug-in (and I do not know whether calibre changes tables and list to some other constructions), but judging from your description earlier in this thread your plug-in might be prone to these problems too.

Last edited by tshering; 04-15-2013 at 04:36 AM.
tshering is offline   Reply With Quote
Old 04-15-2013, 10:01 AM   #203
Anak
Fanatic
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 598
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
After using the KoboTouchExtended plugin to I found that
the first html-tag or span-tag after a <span class="koboSpan" id="kobo.1.1"> a white space before this tag is removed.

Original text (* represents a space, that is removed after conversion):
Code:
<h2>Moody’s plaatst vraagtekens bij waardering*<small>DE</small></h2>
…
<p>Het bod van*<span class="smallcaps">JAB</span> waardeert <span class="smallcaps">DEMB</span> in totaal op 7,5 miljard euro.
After Kobofying the epub:
Code:
<h2><span class="koboSpan" id="kobo.1.1">Moody’s plaatst vraagtekens bij waardering<small>DE</small></span></h2>
…
<p><span class="koboSpan" id="kobo.4.1">Het bod van<span class="smallcaps">JAB</span> waardeert <span class="smallcaps">DEMB</span> in totaal op 7,5 miljard euro.
Red: first html-tag/code: space removed
Green: second, third… html-tag/code: space not removed.

Is there a way to fix this? It should only be fixed if a white space precedes the first html-tag/code. Not just simply add one.
Attached Files
File Type: epub Quick Hyphenation Test.epub (3.3 KB, 152 views)
File Type: epub Quick Hyphenation Test - Anonymous.kepub.epub (3.4 KB, 158 views)

Last edited by Anak; 04-15-2013 at 10:03 AM.
Anak is offline   Reply With Quote
Old 04-15-2013, 12:15 PM   #204
Anak
Fanatic
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 598
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Quote:
Originally Posted by jgoguen View Post
As I've mentioned many times before, I can't include kobo.js or kobo.css, both of which are needed for many things (highlighting, annotations, bookmarks...) to work properly, because they are copyrighted non-distributable files.
I understand fully why you can include those files.
But nowadays the kobo.css is just an empty file and the kobo.js is the same in every kepub.
Kobo should not put these files into their kepubs but place them on their devices and write a routine that looks for them.
The only interesting thing i've found in the kobo.js is the "webkit-nbsp-mode" implementation by Kobo:

CSS property: -webkit-nbsp-mode
Description
Defines the behavior of nonbreaking spaces within text.
Syntax: -webkit-nbsp-mode: normal | space;
Values
• normal (default): Nonbreaking spaces are treated as usual.
• space: Nonbreaking spaces are treated like standard spaces.

Kobo.js
Kobo's implementation in the kobo.js file:
Code:
webkitNbspMode = 'space';
and could be changed to:
Code:
webkitNbspMode = 'normal';
Maybe this will work on sideloaded epubs if you add this to the reading section of the Kobo eReader.conf file:
Code:
[Reading]
readingWebkitNbspMode=normal
Anak is offline   Reply With Quote
Old 04-15-2013, 12:42 PM   #205
buffaloseven
Watching the Sky
buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.
 
buffaloseven's Avatar
 
Posts: 234
Karma: 634112
Join Date: Sep 2012
Location: Winnipeg, MB
Device: Kobo Aura
The KED currently chokes when trying to send CBR/CBZ files to the Kobo Glo. Is there a chance you could add a small routine to check the type of file being sent and perform the extended features operations only on files that might support it, ignoring others?
buffaloseven is offline   Reply With Quote
Old 04-15-2013, 02:15 PM   #206
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,061
Karma: 2178845
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
Quote:
Originally Posted by Anak View Post
After using the KoboTouchExtended plugin to I found that
the first html-tag or span-tag after a <span class="koboSpan" id="kobo.1.1"> a white space before this tag is removed.

Original text (* represents a space, that is removed after conversion):
Code:
<h2>Moody’s plaatst vraagtekens bij waardering*<small>DE</small></h2>
…
<p>Het bod van*<span class="smallcaps">JAB</span> waardeert <span class="smallcaps">DEMB</span> in totaal op 7,5 miljard euro.
After Kobofying the epub:
Code:
<h2><span class="koboSpan" id="kobo.1.1">Moody’s plaatst vraagtekens bij waardering<small>DE</small></span></h2>
…
<p><span class="koboSpan" id="kobo.4.1">Het bod van<span class="smallcaps">JAB</span> waardeert <span class="smallcaps">DEMB</span> in totaal op 7,5 miljard euro.
Red: first html-tag/code: space removed
Green: second, third… html-tag/code: space not removed.

Is there a way to fix this? It should only be fixed if a white space precedes the first html-tag/code. Not just simply add one.
Quote:
Originally Posted by buffaloseven View Post
The KED currently chokes when trying to send CBR/CBZ files to the Kobo Glo. Is there a chance you could add a small routine to check the type of file being sent and perform the extended features operations only on files that might support it, ignoring others?
Please submit Guthub bug reports. Anak, you won't be able to attach the sample files there (I don't think so anyway) so I'll download them from here.
jgoguen is offline   Reply With Quote
Old 04-15-2013, 02:59 PM   #207
buffaloseven
Watching the Sky
buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.
 
buffaloseven's Avatar
 
Posts: 234
Karma: 634112
Join Date: Sep 2012
Location: Winnipeg, MB
Device: Kobo Aura
Quote:
Originally Posted by jgoguen View Post
Please submit Guthub bug reports. Anak, you won't be able to attach the sample files there (I don't think so anyway) so I'll download them from here.
Rightio. Done.
buffaloseven is offline   Reply With Quote
Old 04-17-2013, 11:20 AM   #208
Anak
Fanatic
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 598
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Quote:
Originally Posted by jgoguen View Post
Please submit Guthub bug reports. Anak, you won't be able to attach the sample files there (I don't think so anyway) so I'll download them from here.
Done.
Anak is offline   Reply With Quote
Old 04-18-2013, 03:12 AM   #209
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Is the 2.5 upgrade going to affect Joel's plugin? I am thinking specifically of this post: if the kobo driver changes in Calibre, would Joel's plugin still work? I suspect this question may be technically daft, but by know you know I am no techie
paola is offline   Reply With Quote
Old 04-18-2013, 03:28 AM   #210
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
It will affect it in the same way that it affect the main plugin. Both have an option to support newer firmware, so just check that for the driver you are using. I have made the changes to the main plugin and they should be in the next calibre release. After that, there won't be a problem for either plugins. Unless one of us break some code.

Unfortunately, I have just remembered there might not be a calibre release this week. Kovid said he was going to be away and might not be able to do the release this week.
davidfor is offline   Reply With Quote
Reply

Tags
epub, kepub, kobo


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloading kepub to ADE scr212 Kobo Reader 14 10-14-2012 02:37 PM
KePub Toolbox Thasaidon Kobo Reader 1 08-08-2012 07:49 AM
What will happen/I gain if I forced an ePub book to a KePub book? andsoitgoes Kobo Reader 4 04-04-2012 04:33 PM
Touch Any hack/work-around to sync bookmarks of non Kobo ePub (kepub) andsoitgoes Kobo Reader 3 04-03-2012 03:56 PM
Kobo Adobe Epub is a Kepub instead rashkae Kobo Reader 61 01-13-2012 06:15 AM


All times are GMT -4. The time now is 04:14 AM.


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