![]() |
#916 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
Quote:
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 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. Last edited by thiago.eec; 09-18-2025 at 05:52 PM. Reason: Removed test version. |
||
![]() |
![]() |
![]() |
#917 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,189
Karma: 77899461
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I tried test version.
1. Noticed in Statistics dialog, hovering over graph shows '0' for pagecount. 2. Can't get the edit to work. For the single-record fic, I created a record, set it to one day before I completed and percent 99%. Pressing apply, it just... disappeared? |
![]() |
![]() |
![]() |
#918 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
Quote:
Maybe I shouldn't send it like that. But only after I finished adding the new option I remembered I had started working on the new records dialog. Tomorrow I'll send the working version. |
||
![]() |
![]() |
![]() |
#919 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,189
Karma: 77899461
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
|
![]() |
![]() |
![]() |
#920 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
|
|
![]() |
![]() |
![]() |
#921 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
New test version:
1) Now we have a records editor. You can add, remove and edit your records (except for the last one, matching your calibre library info). It works for any year. When you change the progress, the page count is calculated automatically. 2) Added a new option to the config: you can choose to show read books or read pages in the statistics dialog. The other info will be available hovering the bars. Last edited by thiago.eec; 09-20-2025 at 08:28 AM. Reason: New test version |
![]() |
![]() |
![]() |
#922 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
- Bug fix: sort the records dict treating the idx as integer, instead of text, avoiding the wrong order like '0, 1, 10 ,11, 2, 3,...9'
If you test this version, please leave your feedback. Does the page count show when hovering? Does the records editing work perfectly? Any other suggestions? ![]() Last edited by thiago.eec; Yesterday at 08:46 PM. Reason: New test version |
![]() |
![]() |
![]() |
#923 | |||||
Member
![]() Posts: 13
Karma: 10
Join Date: May 2023
Device: Kobo Glo
|
Quote:
Sadly it is not working for me. I think this might be a local thing. The issue I could find out is, that the month names are lower case (from daily_page_count): Quote:
Quote:
This results in the for loop: for month in daily_page_count to insert new month into read_pages_month_count instead of replacing the existing once. This is how read_pages_month_count looks like after: Quote:
To be consistent I modified daily_page_count to be capitalized only in the function get_month_stats to be consistent with everything else: Quote:
Pages are shown correctly and books read when hovering if the settings is set or vise verse if not. Sorry for the long post and thanks again for implementing this feature <3 |
|||||
![]() |
![]() |
![]() |
#924 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
So, to make sure it will always work, the best thing to do is to keep everything lowercase. So I did this: Code:
read_pages_month_count = {k.lower(): v for k, v in read_pages_month_count.items()} Please test and confirm it works. Last edited by thiago.eec; Today at 09:44 AM. Reason: New test version |
|
![]() |
![]() |
![]() |
#925 | |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2023
Device: Kobo Glo
|
Quote:
Sadly, this does not work. 1. In "get_month_html" function to create "bar" you access m[i] which is still upper case. So this works: Code:
if prefs['pages_instead_of_books']: # Read pages bar = month_bar.format(month_pages_stats[m[i].lower()][0], month_pages_stats[m[i].lower()][1], '<a href="http://reading_goal/' + m[i].lower() + '">' + m[i] + '</a>', str(month_books_stats[m[i].lower()][0])) else: # Read books bar = month_bar.format(month_books_stats[m[i].lower()][0], month_books_stats[m[i].lower()][1], '<a href="http://reading_goal/' + m[i].lower() + '">' + m[i] + '</a>', str(month_pages_stats[m[i].lower()][0])) 2. Also an error when updating a book in the function "update_summary" Code:
if data[book_id]['status'] == 100: read_books_count += 1 month = data[book_id]['date'].astimezone().strftime('%b') read_books_month_count[month] += 1 so this I had to change to: Code:
month = data[book_id]['date'].astimezone().strftime('%b').lower() With these two changes everything seemed to work. I tried to use all the features and no error was thrown anymore. ---- Is it really necessary to use lowercase? I think it might be easily missable somewhere which might result in an error. But maybe removing lowercase everywhere will also result in other errors ... Another idea would be to use a new, forced lower case dict of the month abbreviation list ... like defining a global: Code:
ml = [month.lower() for month in m] And then only use m when displaying it to the user, e.g. in "'">' + m[i] + '</a>'" ---- Anyways, fixing the 2 codeblocks as described above worked for me so far. Again, thank you so much! Last edited by Feoras; Today at 04:24 AM. |
|
![]() |
![]() |
![]() |
#926 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#927 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
I hope this is the last test version before the release.
I added the fix from @Feoras. Last edited by thiago.eec; Today at 01:35 PM. Reason: New test version |
![]() |
![]() |
![]() |
#928 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,189
Karma: 77899461
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
1. Can make new record, but can't edit pagecount on it? 2. Also couldn't make record for different year. 3. As my Calibre viewer pagecount tends to differ a bit from what Page Count calculates, option to put in percentage would be helpful. |
|
![]() |
![]() |
![]() |
#929 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
Every year has their own database. If you want to create a record for another year (let's say 2024), first select this year in combobox; then open the records editor and create the record. ------ Edit: Just noticed that the date column is misconfigured, only accepting 2025's dates. I'll fix this. Put the percentage where? In the record editor, you edit the percentage and the date (the total page count for the book comes from your calibre library, and the partial page count is calculated based on the percentage inserted). |
|
![]() |
![]() |
![]() |
#930 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,262
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Test Version
Bug fix: when adding a record for a different year, the plugin still locked the date to the current year
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Reading List | kiwidude | Plugins | 1430 | 09-03-2025 05:14 AM |
[GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |
Reading Goal | KyBunnies | Audiobook Discussions | 12 | 10-25-2017 05:29 PM |