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 10-01-2018, 05:56 AM   #196
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
I'm releasing Plato 0.5.0 today.

Plato now has a built-in ePUB renderer, written from scratch, in addition to the renderer that mupdf provides. Although a few things are still missing (tables, lists, floats, borders, rtl, etc.), it seems to already have enough features to properly render most of the HTML and CSS encountered in ePUBs. The renderer uses absolute page numbers (one page for every 2048 bytes of markup). This allows me to only build the display list of the spine item that holds the current page number.

The algorithm used to break paragraphs into lines is the Knuth-Plass algorithm (1981). More precisely, there are at most three passes: first we try without hyphenation ; if it fails we hyphenate using the Knuth-Liang algorithm ; if it still fails, we try with a simpler algorithm, that has no limits on the stretching of glues. By introducing optional breaks within a word, we might break a ligature. And if we later unbreak this ligature, we might end up with a line length that doesn't match the length that was used by the algorithm. The way I deal with this problem is by redistributing the width difference into the line's glues. Knuth and Plass solved this problem by generalizing the penalty primitive into a {Pre,No,Post}Break tuple. This is described in Document Preparation Systems, 1982, pp. 221–242): I don't have access to this paper.

The CSS parser only supports simple selectors: name#id.class1.class2.⋯.classn and the following combinators: X > Y, X + Y. If you're interested in typography and high quality fonts, you'll be happy to know that font-feature-settings is supported. Finally, I thought it would be interesting to be able to achieve some of the constructions made possible by the box–glue–penalty primitives described in the original paper, and for this purpose, I've introduced the custom `-plato-insert-{before,after}` properties. The solution to the MR Problem, for example, can be transposed as:
Code:
.flush-right {
	-plato-insert-before: penalty 10000, glue 0 100em, penalty 50,
	                      glue 1em, box, penalty 10000, glue 0 100em;
	-plato-insert-after: penalty -10000;
}
Embedded fonts are ignored, A declaration of the form font-family: A, …, Z, K is parsed as font-family: K where K is one of the following keywords: serif, sans-serif, monospace, cursive, fantasy.

You can set the serif font family, font size, margin width, line height of a document. The default values are in the reader section of the settings. The font-path setting of the same section defines the location of the user fonts (the default is /mnt/onboard/fonts).

The built-in ePUB engine is the default engine, the related setting, in the reader section is epub-engine, the possible values are "built-in" and "mupdf".

Because the type of the refresh-every setting has changed, you'll need to remove it from your Settings.toml before you upgrade.

Other changes:
  • The automatic importer now retrieves metadata from ePUBs.
  • The shelf's second column now displays the progress status by default. The corresponding setting, in the home section, is second-column, the possible values are "progress" and "year".
  • The Clara HD was added to the list of devices.
baskerville is offline   Reply With Quote
Old 10-01-2018, 10:57 AM   #197
pickyaxe
Addict
pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.pickyaxe ought to be getting tired of karma fortunes by now.
 
Posts: 285
Karma: 3762916
Join Date: Nov 2011
Device: none
Just wanted to say this is an impressive project and to thank you for all the work you continue to put into it!
pickyaxe is offline   Reply With Quote
Advert
Old 10-01-2018, 09:11 PM   #198
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,736
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by baskerville View Post
Plato now has a built-in ePUB renderer, written from scratch, in addition to the renderer that mupdf provides.
Your ePub renderer is really impressive. The code looks quite nice, and it actually works well for most of my books. I especially like the way you handled the layout. Keep up the great work!
geek1011 is offline   Reply With Quote
Old 10-02-2018, 02:19 AM   #199
neoberg
Junior Member
neoberg began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2018
Device: Kobo Clara HD
Hello,

I am not a big fan of KSM or other menus and I use my Kobo mainly for XCSoar. How can I run Plato directly from command line ?(So I can add a menu item for running Plato to my XCSoar build)

When I run it like './plato' its giving this error:
Quote:
./plato: error while loading shared libraries: libdjvulibre.so.21: cannot open shared object file: No such file or directory
Quick edit: I was trying to solve this yesterday evening and now just after asking this, I had the idea of moving to contents of ./lib to the same folder with the executable It worked.

Another edit: If I don't stop nickel, nickel and plato are racing for touch events and screen updates. If I stop it, plato's ui renders very small and can't handle touch correctly any ideas?

Last edited by neoberg; 10-02-2018 at 02:29 AM.
neoberg is offline   Reply With Quote
Old 10-02-2018, 04:50 AM   #200
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by neoberg View Post
If I don't stop nickel, nickel and plato are racing for touch events and screen updates. If I stop it, plato's ui renders very small and can't handle touch correctly
There're currently two ways of launching Plato.
  • The fmon launcher assumes that Nickel is running, kills it, and restarts it when Plato quits.
  • The standalone launcher assumes that Plato is started at the very end of /etc/init.d/rcS (cf. firmware.patch), instead of Nickel.

The binary needs a few environment variables and all the resources included in plato-0.5.0.zip.
baskerville is offline   Reply With Quote
Advert
Old 10-02-2018, 06:10 AM   #201
neoberg
Junior Member
neoberg began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2018
Device: Kobo Clara HD
Quote:
Originally Posted by baskerville View Post
There're currently two ways of launching Plato.
  • The fmon launcher assumes that Nickel is running, kills it, and restarts it when Plato quits.
  • The standalone launcher assumes that Plato is started at the very end of /etc/init.d/rcS (cf. firmware.patch), instead of Nickel.

The binary needs a few environment variables and all the resources included in plato-0.5.0.zip.
Thank you, I'll try running it at the and of the rcS. It works for me since XCSoar restarts the system to run Nickel, too.

Last edited by neoberg; 10-02-2018 at 06:12 AM.
neoberg is offline   Reply With Quote
Old 10-06-2018, 08:20 AM   #202
CH23
Bottom Text
CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.CH23 ought to be getting tired of karma fortunes by now.
 
Posts: 146
Karma: 332882
Join Date: Nov 2016
Device: Kobo Clara HD, Kobo Glo HD
Hi baskerville,

I wanted to congratulate you on making such a nice application, and add that it works well on the Clara HD.

If you need anything tested, I'm more than willing to help.
CH23 is offline   Reply With Quote
Old 10-06-2018, 08:39 AM   #203
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1
Quote:
Originally Posted by baskerville View Post
There're currently two ways of launching Plato.
  • The fmon launcher assumes that Nickel is running, kills it, and restarts it when Plato quits.
  • The standalone launcher assumes that Plato is started at the very end of /etc/init.d/rcS (cf. firmware.patch), instead of Nickel.

The binary needs a few environment variables and all the resources included in plato-0.5.0.zip.
It works with kfmon too.
Good luck.
jcn363 is offline   Reply With Quote
Old 10-08-2018, 09:12 AM   #204
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Plato 0.5.1 was released.
  • It is now possible to wake from suspend at any point in time.
  • The go to page input field now handles relative page jumps. You can jump to the n-th page after (resp. before) the current page with +n (resp. -n).
  • The information shown in the second column of the book's stripe can be changed through the Second Column submenu of the library menu.

I should have mentioned this earlier, although I don't think it will have a tremendous impact on the user experience, but the built-in ePUB renderer will not work with books with more than 2 million pages.
baskerville is offline   Reply With Quote
Old 10-09-2018, 08:31 AM   #205
danielr
Enthusiast
danielr began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jul 2018
Device: Kobo Aura One
Is it possible to put the menus in Spanish?
danielr is offline   Reply With Quote
Old 10-09-2018, 04:00 PM   #206
Dirk-71
Zealot
Dirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolate
 
Posts: 120
Karma: 33696
Join Date: Dec 2016
Location: Germany
Device: Kobo: Libra 2, Aura One, Glo HD, Clara 2E
A step-by-step guide for novices would be beneficial. The guide on github is not for people who are no developers. plato.sh? plato.png? Where do I find it???? A bit confusing to me.
Dirk-71 is offline   Reply With Quote
Old 10-10-2018, 07:08 AM   #207
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1
KFMON
* Extract the full content of kfmon archive into the root directory of your device.
* Extract the content of the zip into the .adds/plato directory of your device.
* You need a /.adds/kfmon/config/plato.ini and an /icons/plato.png.
* Eject and unplug your device.

The guide for KSM and fmon.

Good luck.
jcn363 is offline   Reply With Quote
Old 10-10-2018, 10:59 AM   #208
tlc630
Member
tlc630 began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Oct 2018
Device: Kobo Glo Clara HD
Plato 0.5.1 Frontlight

Hi,

First I would like to congratulate you on this project. It is a real pleasure to use with a very attractive appearance and 'feel'.

But, I just installed version 0.5.1 on my Glo and the the frontlight no longer works. Pressing the light icon does nothing. I reverted to v 0.5.0 and the light works. Any ideas on what I should try to isolate the problem?

My environment is:
Kobo Glo
Software v 4.8.11073 (b628114af7,5/8/18)
KFMon v 1.2.6-1-g9ab7d3a

Thanks!
tlc630 is offline   Reply With Quote
Old 10-10-2018, 12:13 PM   #209
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by tlc630 View Post
Pressing the light icon does nothing.
This can only happen if the frontlight is disabled.

Can you:
  • Toggle the frontlight by holding the frontlight icon?
  • Bring up the main menu by tapping the main menu icon?
baskerville is offline   Reply With Quote
Old 10-10-2018, 01:19 PM   #210
Dirk-71
Zealot
Dirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolateDirk-71 is generous with chocolate
 
Posts: 120
Karma: 33696
Join Date: Dec 2016
Location: Germany
Device: Kobo: Libra 2, Aura One, Glo HD, Clara 2E
Quote:
Originally Posted by jcn363 View Post
.....
The guide for KSM and fmon.
......
Good luck.
Thank you! I'll give it a try!
Dirk-71 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PocketBook-KOReader: a document reader for PDF, DJVU, EPUB, FB2, CBZ, ... (AGPLv3) chrox KOReader 566 04-19-2024 05:28 AM
KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) hawhill Kindle Developer's Corner 1268 02-27-2024 11:49 AM
Kindle -- KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) hawhill KOReader 1219 01-27-2024 02:29 PM
v3 vs. v3+ as a pdf/DjVu reader hedonism_bot HanLin eBook 7 11-02-2010 08:16 PM


All times are GMT -4. The time now is 06:53 AM.


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