View Single Post
Old 05-16-2020, 11:43 AM   #11
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,805
Karma: 7423683
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by rigogsilva View Post
why? why? Why I don't have access to my reading data. Why does it have to be a blob.

Well, I am a data engineer and I live for data. I am new to e-readers, and I have spent a good amount of time trying to get my reading stats data. It should just be available!

Well. Here it goes. I am taking stab at the ExtraData. Seems like a lot of people have failed at it, or not tried hard enough.

Thinking I can maybe put together a "god" python library to decode this blob. Here is what I have so far:

```
wordsRead {'length': 9, 'value': 35, 'start_position': 4, 'end_position': 26}
wordCounts {'length': 2871, 'value': 2930, 'start_position': 35, 'end_position': 59}
eventTimestamps {'length': 2871, 'value': 5835, 'start_position': 2930, 'end_position': 2964}
ViewType {'length': 5, 'value': 5860, 'start_position': 5835, 'end_position': 5855}
Annotations {'length': 0, 'value': 5886, 'start_position': 5860, 'end_position': 5886}
Orientation {'length': 5, 'value': 5917, 'start_position': 5886, 'end_position': 5912}
Portrait {'length': 0, 'value': 5937, 'start_position': 5917, 'end_position': 5937}
ExtraDataReadingSessions {'length': 9, 'value': 5998, 'start_position': 5937, 'end_position': 5989}
ExtraDataReadingSeconds {'length': 9, 'value': 6057, 'start_position': 5998, 'end_position': 6048}
ExtraDataDateCreated {'length': 49, 'value': 6150, 'start_position': 6057, 'end_position': 6101}
ContentType {'length': 5, 'value': 6181, 'start_position': 6150, 'end_position': 6176}
plcto/-ooeu+i {'length': 0, 'value': 6212, 'start_position': 6181, 'end_position': 6212}
ButtonPressCount {'length': 6266, 'value': 6248, 'start_position': 6212, 'end_position': 6248}
```

I know most of the values with length 9 are good. The others need some work.
Sorry, but your solution is quite fragile and is a bit more complex than needed. The blob is just a QDataStream. If you don't want to use Qt (through C++, PyQt, or whatever), I've written a decoder for it in Go here: https://gist.github.com/geek1011/a41...1dc481020c5290.
geek1011 is offline   Reply With Quote