|
|
#976 |
|
Member
![]() Posts: 18
Karma: 10
Join Date: May 2023
Device: Kobo Glo
|
Hey there,
it's been awhile but thank you so much for all the improvements for this plugin and adding the bar/column daily chart! Finally had some time to add all the books from previous years to the plugin too. I just have one tiny issue ... that calibre closes without any error when I click on a month to open the daily chart. I'm not quite sure why this happens. It happens with a dummy library with just one entry, column or line, no matter what calibre just closes. To test if it is the daily html/code causing this, I replaced the starting monthly view with the daily view and this works - no crash. Every other view works (genre, month, different year, all years). So I am not sure what could cause this crash, especially since others do not seem to have this issue. I am using calibre on Linux, so it might very well be an OS specific issue too ... |
|
|
|
|
|
#977 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,297
Karma: 1436993
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
|
|
|
|
|
| Advert | |
|
|
|
|
#978 | |
|
Member
![]() Posts: 18
Karma: 10
Join Date: May 2023
Device: Kobo Glo
|
Quote:
Code:
self.browser.page().navigationRequested.connect(self.daily_pages_columns) Code:
class ReadingGoalStatisticsDialog(Dialog):
def setup_ui(self) -> None:
# ...
self.change_view_menu.addItem(get_icon('genre_view.png'), _('By genre'))
self.daily_button_jan = QPushButton(_('Jan'))
self.h_layout.addWidget(self.daily_button_jan, 0, Qt.AlignRight)
self.daily_button_jan.clicked.connect(lambda: self.on_daily_button('jan'))
self.h_layout.addWidget(self.change_view_menu, 0, Qt.AlignRight)
# ...
# ...
def on_daily_button(self, month) -> None:
# this is basically daily_pages_columns with only the part in len(url) == 3 and url replaced with month
daily_page_count = self.daily_page_count()
daily_data = [[_('Days'), _('Pages')]]
temp_daily_data = []
for day in daily_page_count[month]:
temp_daily_data.append([str(day), daily_page_count[month][day]])
for item in temp_daily_data:
daily_data.append(item)
h_axis_title = _('Days')
v_axis_title = _('Pages')
previous_button = _('Previous')
next_button = _('Next')
main_title = month.upper()
background_color = '#121212' if is_dark_theme() else '#ffffff'
text_color = '#ddd' if is_dark_theme() else '#000000'
_daily_html_column = daily_html_column
formated_daily_html_column = _daily_html_column.format(daily_data, background_color, text_color,
h_axis_title, v_axis_title, main_title,
previous_button, next_button)
self.browser.page().setHtml(formated_daily_html_column)
self.month_name = deepcopy(month).lower()
self.months = [x.lower() for x in daily_page_count.keys()]
self.year_menu.setFocus()
Any idea? |
|
|
|
|
|
|
#979 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,297
Karma: 1436993
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
* sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [GUI Plugin] Reading List | kiwidude | Plugins | 1430 | 09-03-2025 06:14 AM |
| [GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 06:25 AM |
| Reading Goal | KyBunnies | Audiobook Discussions | 12 | 10-25-2017 06:29 PM |