View Single Post
Old Yesterday, 05:42 PM   #916
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,250
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Test version

Quote:
Originally Posted by ownedbycats View Post
And I guess even if I did insert the starting date, it'd still have a massive jump. Hmm.

There's three things I can think of:

1. Average out the pages between the records instead of putting all the pages in on the date of new record.

2. A way to exclude pages from certain books?

3. Maybe ignore books that only have one date?
I'm working on a new dialog for editing the book's records. It's not saving the edits yet, but you can see how it's gonna work with the test version attached. Select the book and click on the new button on the right side of the 'Edit reading goal' dialog. I think this solves your problem and gives us a general way to deal with wrong records.

Quote:
Originally Posted by Feoras View Post
I would like to come back to this request, though except "alongside" I would like to have the option to change the main statistic view to show pages instead of the book count.
Sadly I do not read that many books a month, so having the pages read per month makes the statistic more useful to me.

Idea:
* Similar to `read_books_month_count` add a statistic for pages read per month.
* Have a config checkbox to change this setting.
* `get_month_stats` returns either the current count or the new pages count based on the checkbox

Working prototype git diff attached (inside zip).
(Might need some logic to now show the read books on month hover instead of pages (in `get_month_html`)


---
Another idea would be to expand the statistics view to have one with book read count and another next to it (like to the right) with the page count. This would probably the "alongside" request as original stated.


Anyway, thanks for considering any of this!
Thanks for the help!
In my testings, the code you provided got the wrong page count, though. For one thing, it was working with accumulated values:
Code:
read_pages_month_count[month] += read_page_count - last_year_pages_count
Note that this line is inside a 'for' loop, iterating over all books in the goal, so the 'read_page_count' refers to the whole year.
To get only the month values, I used the existing 'daily_page_count' method.

Anyway, test the version attached.

P.S.: Note what I wrote above, replying to @ownedbycats. There is an unfinished feature in this test version, but it doesn't affect any other feature or modify the database.
Attached Files
File Type: zip Reading_Goal_test_version.zip (438.6 KB, 8 views)
thiago.eec is online now   Reply With Quote