View Single Post
Old 01-13-2013, 08:20 AM   #1
ichrispa
Enthusiast
ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.
 
Posts: 40
Karma: 8604
Join Date: Dec 2012
Location: Germany
Device: Kobo Touch
Custom KT UI without QT or killing nickle

Hi everyone,

there are many ideas out there on how to create own applications for the KT and integrating them into the UI. All I have found so far involve one of the following three points:
  • Create an own qt embedded application. Requires to kill nickle and start the own app.
  • Create a qt embedded plugin, replacing one of the extras (chess, notepad, sudoku) to start it from nickle.
  • Using Python and pygame to create a standalone app.

I wasn't quite statisfied with any of them, because I do not want to get started on QT development. And I do want my normal UI to run... after all, this is a reader. So I came up with a new way I would like to share.


In my previous post about installing a webserver on the KT I elaborated on how it is possible to write php applications running on the Kobo Touch. Of course, these are accessible from the KT browser... though that is not really integrating.

Here's the next step: Redirecting the Webstore. Once I had the browser running on my KT, I wondered how the webstore works. It turns out that many pieces of the regular user interface are in fact webpages, displayed in a qt app using hindenburg (the KT's webbrowser). That goes for the webstore as well: What you see after accessing the store are in fact webpages... take a look at webstore.kobobooks.com - looks familiar?

You can control the address of the webstore. The last three entries in .kobo/Kobo/Kobo eReader.conf define the URL used when accessing the webstore.

I created my own page on the Kobo's local webserver (using shttpd, see previous post) to create the directory /71485/Search/Categories/index.php. Since the webstore is redirected to 127.0.0.1 as described in my previous post, calling the webstore now opens my own custom index.php.

This opens a new way to create a custom UI fully integrated with nickel without the requirement to modify the onboard libraries. It should be fairly Update-Resistend and in the end everything comes down to web development. Which in my eyes is easier to understand and modify than QT embedded applications.

A nice side effect: You can also access that Kobo UI from any computer in the local subnet... for example to take screenshots of the kobo.

I will post some screenshots of my little "Webstore UI" soon to show some of the possibilities given here. For starters, I am going to create the following extensions I miss:
  • Rebooting the Kobo.
  • Rescanning the onboard library by emulating plugging/unplugging of a usb host.
  • A basic command prompt.
  • Taking screenshots.
  • An attic to store books outside the Kobos scanned directories (i.e. to hide an old newspaper).

As a note: php and sqlite to go together. I haven't compiled sqlite support for php yet, but after that one could modify the kobo's sqlite DB from an onboard php interface. Ever wanted to reclassify that sideloaded calibre book as a newspaper? Here's your chance ^^

Regards,

ichrispa
ichrispa is offline   Reply With Quote