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 11-16-2018, 07:53 AM   #1
jlemonde
Enthusiast
jlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to behold
 
Posts: 45
Karma: 19864
Join Date: Sep 2018
Device: Kobo Clara HD
Are there additionnal reading statistics available while looking in the databases?

Hello!

I am especially interessed in finding a way to see how much time I have spent which day (or which session) and how many pages I read which day (or which session), ideally for every book independently.
I don't think everything is stored indefinitely, but since some statistics such as the average session time for every book and the amount of pages per minutes are made available, I think that information such as a list of the sessions for each book, including the timestamp of the beginning of the session and the timestamp of the end of the session, and the page number for both, should be stored.

Were is stored this information? Can I read it from a database (for example in .kobo/something.db) ??

Thanks in advance !!
jlemonde is offline   Reply With Quote
Old 11-16-2018, 08:37 AM   #2
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
There are a lot of statistics store in the database, but they are not stored in an easy to get way. The table Event holds it all. The different EventTypes store different things. Some are at book level some at reader level. But, the data you are after is stored in a BLOB in some binary format. I can see roughly what is in some of them, but haven't bothered decoding them in full.

I have mapped out a lot of the EventTypes and posted them here a couple of times here. They do include counts, such as how many times a book has been opened or closed. That plus a total time read is all that is needed to calculate the time per session. But, the list of sessions does seem to be there.

If you want to see the stats for a book, you can add the following to the config file:

Code:
[FeatureSettings]
BookSpecificStats=true
With this, when you long-press on a book, it will have a statistics option in the menu. That will take you to the stats page for the book. Otherwise the stats page only shows the most current book.
davidfor is offline   Reply With Quote
Advert
Old 11-25-2018, 07:51 AM   #3
jlemonde
Enthusiast
jlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to beholdjlemonde is a splendid one to behold
 
Posts: 45
Karma: 19864
Join Date: Sep 2018
Device: Kobo Clara HD
Thank you for you response !

I was able to set the BookSpecificStats, which I didn't know existed.

As for the stats I was really looking for: I opened the KoboReader.sqlite database, and in the table Events, I noticed that I had a lot of 46 in the column EventType. Looking at the BLOBs in the ExtraData column, I discovered that there was a lot of other information inside, which I was not actually able to decode. But using a simple binary-to-text conversion (most probably through ASCII), I get results similar to ".............P.a.g.e.s.T.u.r.n.e.d.T.h.i.s.S.e.s. s.i.o.n......." Or excerpts much longer with sometimes some not legible characters such as ] or ÿ.
But taking into account this example, where is the number of 'pages turned this session' actually stored? Is the key of the problem to find a way to give a sense to the ContentID column?
jlemonde is offline   Reply With Quote
Old 11-28-2018, 06:44 AM   #4
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
The contents of the ExtraData column is probably a serialized data structure. The names will define the elements of the structure. The data is the non-legible characters between them. It is a matter of working out what the datatype is and decoding that. For the example you have, it is probably an integer. But, it could be something else.

It should be possible to decode. It is a matter of working out what each element in the structure is made up of. You can examine the firmware and find hints to the structure. And maybe work out what the exact datatypes are.
davidfor is offline   Reply With Quote
Old 11-28-2018, 07:25 AM   #5
stuartjmz
Nameless Being
 
Quote:
Originally Posted by davidfor View Post
If you want to see the stats for a book, you can add the following to the config file:

Code:
[FeatureSettings]
BookSpecificStats=true
With this, when you long-press on a book, it will have a statistics option in the menu. That will take you to the stats page for the book. Otherwise the stats page only shows the most current book.
Thank you so much for this! I'm mostly reading short mystery novels right now, but Monte Cristo was skewing my stats. Now I can break it out separately. Very handy for when I finally start Tolstoy's mini novella on Napoleon's fiasco of a foray.
  Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving Reading Statistics? Darkkobo Reading and Management 0 02-01-2017 10:29 AM
Reading Statistics? Darkkobo Kobo Reader 8 10-20-2016 01:55 AM
PocketBook reading statistics druss67 PocketBook 4 08-09-2015 07:08 AM
Reading Statistics ! danmagay Kobo Tablets 0 01-08-2012 04:33 PM
Where can I find reading statistics? charlieperry Lounge 1 09-05-2008 04:03 AM


All times are GMT -4. The time now is 08:59 AM.


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