Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-31-2013, 03:31 PM   #16
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 Lucas Malor View Post
Do you know if the program GUI (nickel) look for a custom css as kepubs do?
Yes, it does but I didn't get it to work.

libnickel.so1.0.0 looks for

Code:
res:///userStyle.css
(more info @ Datalogics)

Just as it looks for installed hyphen dictionaries in
Code:
res:///hyphenDicts/
(more info @ Datalogics)
This works as I have successfully installed a Dutch hyphen dictionary.

And for fonts:
Code:
res:///fonts/
I don't know if this is a reference to the internal font directory, the user font directory with sideloaded fonts, or both. I assume both.
Anak is offline   Reply With Quote
Old 07-31-2013, 03:45 PM   #17
Mike76
Connoisseur
Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.
 
Mike76's Avatar
 
Posts: 69
Karma: 35064
Join Date: Jan 2012
Location: Hungary
Device: Kindle Paperwhite 2013, Kobo Mini, iPad Mini
Quote:
Originally Posted by Anak View Post
This works as I have successfully installed a Dutch hyphen dictionary.
Can you tell some details about it? I would like to add Hungarian dictionary to my Kobo Mini, if it's possible.
Mike76 is offline   Reply With Quote
Advert
Old 07-31-2013, 04:07 PM   #18
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,168
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
While that filename might be present in the lib file, running strace showed no sign of it being looked for.
PeterT is offline   Reply With Quote
Old 07-31-2013, 05:01 PM   #19
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 Mike76 View Post
Can you tell some details about it? I would like to add Hungarian dictionary to my Kobo Mini, if it's possible.
Datalogics RMSDK:
Customers may add their own hyphenation dictionaries for other languages. Hyphenation dictionaries are in the same format as the ones used in OpenOffice.
For the Dutch hyphenation to work I made a patch containing only these two files:
Code:
.\usr\local\Kobo\hyphenDicts\hyph_nl.dic
.\usr\share\hyphen\hyph_nl_NL.dic
The easiest way to make a patch file is using a full firmware version and then deleting every single file and directory in that firmware except for one existing hyphenation dictionary. I.e. hyph_en.dic and hyph_en_US.dic. And then save it.

I assume you do have (or can find) an Hungarian hyphenation dictionary.
  1. Replace hyph_en.dic for the OpenOffice compatible Hungarian hyphenation dictionary. I'm not sure if the Hungarian country code is hu, but if it is the file should be named hyph_hu.dic. This file needs to be in UTF-8 format (ANSI won't work).
  2. Then rename hyph_en_US.dic in hyph_hu_HU.dic. This file contains only a path to the correct hyphenation file. I.e: English is: /usr/local/Kobo/hyphenDicts/hyph_en.dic. Rename hyph_en.dic in hyph_hu.dic and save it.
You're done.

Then install the patch the same way as installing firmware manually.
Anak is offline   Reply With Quote
Old 08-01-2013, 02:29 AM   #20
byblo
Traumatized
byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.byblo can program the VCR without an owner's manual.
 
byblo's Avatar
 
Posts: 68
Karma: 175722
Join Date: Oct 2009
Device: paper, Kobo Glue
So, theres no equivalent for epub ?
byblo is offline   Reply With Quote
Advert
Old 08-01-2013, 02:54 AM   #21
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
Not that anyone has found, but...

I have just finished a change for the Kobo driver in calibre. This adds an option to read a file with CSS and append it to the stylesheets in an epub when the sending the book to the device. It does a couple of other things depending on the contents of the file. This will be in the next calibre release. I will post a full description around the time release happens.

The extended driver has already been changed so this won't break it. But, there will be an update to more fully take advantage of this change.
davidfor is offline   Reply With Quote
Old 08-01-2013, 05:54 AM   #22
WS64
WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.
 
WS64's Avatar
 
Posts: 660
Karma: 506380
Join Date: Aug 2010
Location: Germany
Device: Kobo Aura / PB Lux 2 / Bookeen Frontlight / Kobo Mini / Nook Color
But this is not the same since it changes the epub itself.
That means if Kobo changes things again and you try to compensate this by an additional CSS you have to upload all files again.
WS64 is offline   Reply With Quote
Old 08-01-2013, 06:13 AM   #23
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
It's also better than nothing! And really, I've looked at davidfor's code, Kobo would have to break ePub compatibility to stop his tweak from working. It's just a change to the CSS already in a book, doesn't change the library cooy, and gets applied every time the book is sent. And pretty slick

I'm also doing some CSS tweaks, but I decided not to use this kepub CSS because I'm interested in generating files that could be used on any ePub reader post-conversion. I also went a different way from davidfor, but Kobo would have to break ePub compatibility to stop my tweak from working, which I don't see happening barring a company-wide bout of insanity. Which I guess technically possible...
jgoguen is offline   Reply With Quote
Old 08-01-2013, 08:07 AM   #24
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
I'm with jgoguen on this. It would be much better if Kobo had user adjustable way of doing this on the device. But they don't for epubs, so something like this is the only way to go. And to break this, Kobo would have to completely epub reading.
davidfor is offline   Reply With Quote
Old 08-01-2013, 10:51 AM   #25
Mike76
Connoisseur
Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.Mike76 turned on, tuned in, and dropped out.
 
Mike76's Avatar
 
Posts: 69
Karma: 35064
Join Date: Jan 2012
Location: Hungary
Device: Kindle Paperwhite 2013, Kobo Mini, iPad Mini
Anak: Thanks for your help, it works fine with normal epubs. However, Kobo epubs generated via Kobo Touch Extended plugin seems to be using a different hyphen dictionary instead of the hungarian one, and I've no idea how to solve it.
Mike76 is offline   Reply With Quote
Old 08-01-2013, 04:58 PM   #26
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 Mike76 View Post
Anak: Thanks for your help, it works fine with normal epubs. However, Kobo epubs generated via Kobo Touch Extended plugin seems to be using a different hyphen dictionary instead of the hungarian one, and I've no idea how to solve it.
Yes, it only works with normal epubs. I do think that kepub uses the same hyphen dictionary but while the Adobe renderer searches for installed dictionaries (based on the language code) the kepub renderer seems only to use the native installed dictionaries. I guess (the path of) these dictionaries are hard coded. Wish Kobo would fix this/add the fexibility to search for other installed languages.

Last edited by Anak; 08-01-2013 at 05:00 PM.
Anak is offline   Reply With Quote
Old 08-01-2013, 05:33 PM   #27
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
I do think that kepub uses the same hyphen dictionary but while the Adobe renderer searches for installed dictionaries (based on the language code) the kepub renderer seems only to use the native installed dictionaries. I guess (the path of) these dictionaries are hard coded.
Depending on when the KePub is created, the answer to that is different. Tell me when the KePub was created and I can probably give you a solid answer.

Quote:
Originally Posted by Anak View Post
Wish Kobo would fix this/add the fexibility to search for other installed languages.
Depending on when the KePub was created, it may not be Kobo's fault, but mine. Again, tell me when the KePub was created and I can tell you whether Kobo already has this flexibility or not, or if I'm not sure I can tell you how to figure it out for yourself pretty quickly.

The moral of the story is "don't assume that it's Kobo's fault when things don't work the way you expect, especially when you're doing things they specifically say not to do" If you're not sure, don't be shy to ask the people who develop the software you're using. I can't speak for all the people who develop calibre and its myriad plugins, but I'm quite happy to tell you when a bug is my fault or Kobo's fault; if it's my fault you're helping to make my software better, and if it's Kobo's fault you could help make their software better and maybe also make mine better at the same time!
jgoguen is offline   Reply With Quote
Old 08-02-2013, 11:00 AM   #28
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
Depending on when the KePub is created, the answer to that is different. Tell me when the KePub was created and I can probably give you a solid answer.


Depending on when the KePub was created, it may not be Kobo's fault, but mine. Again, tell me when the KePub was created and I can tell you whether Kobo already has this flexibility or not, or if I'm not sure I can tell you how to figure it out for yourself pretty quickly.

The moral of the story is "don't assume that it's Kobo's fault when things don't work the way you expect, especially when you're doing things they specifically say not to do" If you're not sure, don't be shy to ask the people who develop the software you're using. I can't speak for all the people who develop calibre and its myriad plugins, but I'm quite happy to tell you when a bug is my fault or Kobo's fault; if it's my fault you're helping to make my software better, and if it's Kobo's fault you could help make their software better and maybe also make mine better at the same time!
No, it has nothing to do with your plugin or calibre. Hyphenation doesn't work with original kepubs or epubs that are only renamed to kepub. Additional hyphenation files are not detected.
Anak is offline   Reply With Quote
Old 08-02-2013, 12:25 PM   #29
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
Oh. Well then, that's going to be awkward. Did you put the hyphenation dic in both /usr/share/hyphen/ and /usr/local/Kobo/hyphenDicts/?
jgoguen is offline   Reply With Quote
Old 08-02-2013, 12:52 PM   #30
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
Yes, see post #19.
Anak is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-950 A little web too to generate custom CSS gsgleason Sony Reader 0 12-18-2011 06:51 PM
Custom CSS Japes Conversion 5 07-09-2011 08:15 PM
PRS-300 Stuck in Opening Book, Loading, restart cycle tiggertiffin87 Sony Reader 0 10-18-2010 08:33 PM
Custom CSS for output deckoff Calibre 1 08-28-2010 11:55 PM
Custom covers for Kobo's book loading screen? Gianorama Kobo Reader 7 07-28-2010 11:44 AM


All times are GMT -4. The time now is 02:07 PM.


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