View Single Post
Old 11-03-2015, 04:45 AM   #2466
Yaretzki
Junior Member
Yaretzki doesn't litterYaretzki doesn't litter
 
Posts: 9
Karma: 110
Join Date: Oct 2015
Location: Wroclaw, Poland
Device: Kobo Glo HD, Kindle PW3
Quote:
Originally Posted by Yaretzki View Post
I wonder if it's possible or how difficult it would be to implement additional feature in statistics section: time to read.
There is already everything to calculate it:
- average time per page
- pages left in book
By combination of above it is easy to get rough estimation of time left to read book.
But I don't know how difficult it would be to implement it in statistic - current, and into status bar as additional information on top of already existing ones.
Y.
Hello,
I did some tests trying to get what I wrote above. Here is what I was able to get:
- edit file main.lua in statistic folder (under plugins folder of koreader)
- add additional line under line #238
- text of additional line:
table.insert(stats, { text = _("Time to read"), mandatory = self:secondsToClock((self.data.pages - tableutil.tablelength(self.data.details)) * (self.data.total_time / tableutil.tablelength(self.data.details))) })

As a result I see additional information in Statistic menu -> Current: Time to Read"

I'm really surprised I was able to do it because my "programming" skills are 0 or even less!
Do it with your file and enjoy!

PS
But I have no idea how to put it on status bar

Y.
Yaretzki is offline   Reply With Quote