![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
|
How are kobo books stored? - Technical
Hi
Has anyone looked at the format of how kobo books are stored in the database. Specifically how is the shortcover_page..FormattedPage field encoded. I suspect that it is a compressed html file encoded in ascii. I would like to be able to add a feature to calibre to allow you to backup the book to the hard drive. Preferably calibre could create a real epub out of it. If I have to, I will look at saving the database rows to a files and zipping them as the book and allow them to be reimported that way but that is messy. If you have any ideas feel free to shoot me a message at timlegge at gmail d0t com. Tim |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 5
Karma: 14
Join Date: May 2010
Location: Wellington, New Zealand
Device: Kobo
|
|
![]() |
![]() |
![]() |
#3 | |
Asha'man
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 335
Karma: 844
Join Date: May 2010
Location: Canada
Device: Kobo
|
Quote:
|
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 30
Karma: 12
Join Date: May 2010
Device: Kobo
|
Hi Tim,
Just in case you're not aware, books that are not encrypted are stored as plain html in the shortcover_page table. (eg. 'Crime And Punishment' - id = 0086fe75-afcd-4da1-8a1f-7f565916d074). I'll have a look at the encryption key, if I come up with anything I'll let you know. Myles. Also the image files appear just to be jpegs renamed to .parsed - may help if reverse engineering the epub. Last edited by mylesau; 06-04-2010 at 07:36 AM. |
![]() |
![]() |
![]() |
#5 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
|
Quote:
I thought I had seen some clear text books. However, since the content table says IsEncrypted = false for all the books and they are Gutenburg books I assumed that they were just compressed and not encrypted. I don't plan on breaking encryption I just figured it would be nice to backup a book before deleting it. Tim |
|
![]() |
![]() |
![]() |
#6 |
Enthusiast
![]() Posts: 30
Karma: 12
Join Date: May 2010
Device: Kobo
|
I'm not sure why they did it, but some of the 'free 100' books (Gutenburg) are actually encrypted and some aren't.
The overuse of the "content" table to store both the book (ContentType = 6) and each of it's 'ShortCovers' (ContentType = 9) is odd to me - it would have made more sense to store these in separate tables, but perhaps there are limitations on the device or some performance gain to do it this way. It looks to me that the IsEncrypted field has no meaning for the book (ContentType = 6) as they are all set to false, but only has meanings for the 'ShortCovers' (ContentType = 9) where they are set either to true or false which is then reflected in the 'shortcover_page' table with encrypted or plain text. I think it would still be of value to be able to 'extract' the epub of an unencrypted book, and certainly of value to be able to 'dump' a single book or selection of books out, encrypted or not, for either backup purposes or perhaps to be able to import back into another Kobo. |
![]() |
![]() |
![]() |
#7 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
|
Hi
Thanks for that information. I kept looking at the book records not the chapters so I did not notice the encrypted field on the chapters. I just assumed they were simply compressed. The encoding makes more sense now. Tim |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to change location books are stored on reader | bdillahu | Calibre | 5 | 10-09-2010 10:09 PM |
Ebook for technical books | ziNde | Which one should I buy? | 13 | 02-21-2010 08:52 AM |
technical books in epub | wang960 | ePub | 3 | 10-07-2009 06:13 PM |
Where are books stored in eBook Library? | ponga163 | Sony Reader | 8 | 01-01-2009 09:36 PM |
Best E-Reader for Technical Books | rndinit0 | Which one should I buy? | 6 | 06-10-2008 07:07 PM |