Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-15-2022, 01:42 AM   #61
harmtemolder
Enthusiast
harmtemolder began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Oct 2020
Device: Kobo Aura
Quote:
Originally Posted by lightmaster View Post
Can you add support for the Device type "USER_DEFINED"? I added it as a compatible device type in the plugin I downloaded and it seems to work just fine, capable of finding the metadata and syncing to Calibre.
Thanks for your input. I've added it in release 0.3.1-beta: https://www.mobileread.com/forums/sh...41&postcount=1

Quote:
Originally Posted by lightmaster View Post
On a different note, it seems that while Koreader sets the "Summary"=>"Status" metadata when you finish a book, it does not set any status metadata for when you have a book that is currently being read. I thought that something like this might work, but my very rudimentary knowledge of python prevents me from trying it myself: "if 'Summary'=>'Status' doesn't exist, and read progress is >0 and <1, then set 'Summary'=>'Status' to 'in-progress'". This logic would also mean that if Koreader does start setting an in-progress metadata, this plugin won't override it.
If this is a bug in KOReader I prefer to have it fixed at the source. Until then this issue is on the issue tracker, so if anyone feels like picking it up their help is greatly appreciated: https://todo.sr.ht/~harmtemolder/kor...libre-plugin/4
harmtemolder is offline   Reply With Quote
Old 09-16-2022, 01:16 AM   #62
harmtemolder
Enthusiast
harmtemolder began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Oct 2020
Device: Kobo Aura
Quote:
Originally Posted by Huwaetzel View Post
The driver can be installed as a plugin and when the device is connected it gives a popup "Pocketbook632. Also in your plugin the error message states "type POCKETBOOK632 not yet supported.
I've added it in 0.3.2. Let me know if it works
harmtemolder is offline   Reply With Quote
Advert
Old 09-16-2022, 05:19 AM   #63
iupiter
Member
iupiter began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2022
Device: Pocketbook Inkpad Color
Quote:
Originally Posted by harmtemolder View Post
I've added it in 0.3.2. Let me know if it works
It works now.


What is the default state of the reading status, if an book never has been opened?
iupiter is offline   Reply With Quote
Old 09-20-2022, 03:11 PM   #64
Huwaetzel
Enthusiast
Huwaetzel began at the beginning.
 
Posts: 33
Karma: 10
Join Date: May 2011
Device: Pocketbook 903
Quote:
Originally Posted by iupiter View Post
It works now.
I can confrim this. Thank you very much for adding the device/driver
Huwaetzel is offline   Reply With Quote
Old 09-24-2022, 03:22 AM   #65
harmtemolder
Enthusiast
harmtemolder began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Oct 2020
Device: Kobo Aura
Quote:
Originally Posted by iupiter View Post
What is the default state of the reading status, if an book never has been opened?
It will probably be empty: This plugin reads the contents of the meta lua file you can find next to the book on your ereader's memory, but KOReader only creates that file when you open a book.
harmtemolder is offline   Reply With Quote
Advert
Old 11-02-2022, 12:08 PM   #66
harmtemolder
Enthusiast
harmtemolder began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Oct 2020
Device: Kobo Aura
Quote:
Originally Posted by lightmaster View Post
On a different note, it seems that while Koreader sets the "Summary"=>"Status" metadata when you finish a book, it does not set any status metadata for when you have a book that is currently being read. I thought that something like this might work, but my very rudimentary knowledge of python prevents me from trying it myself: "if 'Summary'=>'Status' doesn't exist, and read progress is >0 and <1, then set 'Summary'=>'Status' to 'in-progress'". This logic would also mean that if Koreader does start setting an in-progress metadata, this plugin won't override it.
Come to think of it, I actually solved this same issue ages ago using a template function in calibre:



Code:
def evaluate(self, formatter, kwargs, mi, locals, progress_field):
  if progress_field:
    if float(progress_field.strip('%').strip()) < 100:
      return '☐'
    return '☑︎'
  return ''
harmtemolder is offline   Reply With Quote
Old 11-02-2022, 12:13 PM   #67
harmtemolder
Enthusiast
harmtemolder began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Oct 2020
Device: Kobo Aura
Quote:
Originally Posted by harmtemolder View Post
I've gone through my code from 2020 again, and it reads the date from `summary` > `modified` in the `metadata.epub.lua`. But I'm manually opening a couple from books that I've recently finished, and all of these have an empty string in that field. So it looks like KOReader no longer logs that in the metadata.
I've replaced that old code with logic that looks at a book's highlights and sets a first read column to the earliest date, and a last read column to the latest. I hope that helps.
harmtemolder is offline   Reply With Quote
Old 11-02-2022, 02:54 PM   #68
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,789
Karma: 7029971
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by harmtemolder View Post
Come to think of it, I actually solved this same issue ages ago using a template function in calibre:

Code:
def evaluate(self, formatter, kwargs, mi, locals, progress_field):
  if progress_field:
    if float(progress_field.strip('%').strip()) < 100:
      return '☐'
    return '☑︎'
  return ''
Quote:
Originally Posted by harmtemolder View Post
I've replaced that old code with logic that looks at a book's highlights and sets a first read column to the earliest date, and a last read column to the latest. I hope that helps.
If you are running the newest version of calibre then the new Python templates might be of interest. Using these it isn't necessary to create user-defined template functions. See https://www.mobileread.com/forums/sh...53#post4264953 and the post immediately after it.
chaley is offline   Reply With Quote
Old 11-06-2022, 02:13 AM   #69
Hyphen-ated
-
Hyphen-ated began at the beginning.
 
Posts: 46
Karma: 30
Join Date: Jan 2021
Device: Kobo Forma
Hi, I have implemented code in this plugin for a last_read_date column by reading the modify time of the metadata sidecar file and converting that to a date.

So now after I sync from my device, I can get calibre to sort my library by the last date I had each book open in koreader. Hooray!

My code is here: https://github.com/Hyphen-ated/korea...c94813a718df06
Hyphen-ated is offline   Reply With Quote
Old 11-08-2022, 01:55 PM   #70
harmtemolder
Enthusiast
harmtemolder began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Oct 2020
Device: Kobo Aura
Quote:
Originally Posted by Hyphen-ated View Post
Hi, I have implemented code in this plugin for a last_read_date column by reading the modify time of the metadata sidecar file and converting that to a date.

So now after I sync from my device, I can get calibre to sort my library by the last date I had each book open in koreader. Hooray!
Great to hear you got this working for your device. It's probably a USB device connected as regular storage, isn't it?
harmtemolder is offline   Reply With Quote
Old 11-08-2022, 01:58 PM   #71
harmtemolder
Enthusiast
harmtemolder began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Oct 2020
Device: Kobo Aura
On a different note: Someone reported that they got a ZoneInfoNotFoundError with v0.4.0-beta on Windows 10. Unfortunately I cannot test that, and they can't either. So if you have Windows 10 and run into the same issue, I'd be very grateful if you could test the otherwise untested v0.4.1-beta from here. If that solves it, I'll release it here.
harmtemolder is offline   Reply With Quote
Old 11-08-2022, 07:45 PM   #72
lightmaster
Member
lightmaster began at the beginning.
 
lightmaster's Avatar
 
Posts: 22
Karma: 10
Join Date: Aug 2022
Device: Kindle PW4 10th gen; Kobo Libra 2
Quote:
Originally Posted by harmtemolder View Post
On a different note: Someone reported that they got a ZoneInfoNotFoundError with v0.4.0-beta on Windows 10. Unfortunately I cannot test that, and they can't either. So if you have Windows 10 and run into the same issue, I'd be very grateful if you could test the otherwise untested v0.4.1-beta from here. If that solves it, I'll release it here.
I'm getting a "ZoneInfoNotFoundError: No time zone found with key UTC". Running Windows 11. About to download v0.4.1-beta to try it.
lightmaster is offline   Reply With Quote
Old 11-08-2022, 07:47 PM   #73
lightmaster
Member
lightmaster began at the beginning.
 
lightmaster's Avatar
 
Posts: 22
Karma: 10
Join Date: Aug 2022
Device: Kindle PW4 10th gen; Kobo Libra 2
Not getting the error anymore with v0.4.1-beta
lightmaster is offline   Reply With Quote
Old 11-08-2022, 08:03 PM   #74
Hyphen-ated
-
Hyphen-ated began at the beginning.
 
Posts: 46
Karma: 30
Join Date: Jan 2021
Device: Kobo Forma
Quote:
Originally Posted by harmtemolder View Post
Great to hear you got this working for your device. It's probably a USB device connected as regular storage, isn't it?
Yep, it is
Hyphen-ated is offline   Reply With Quote
Old 11-14-2022, 01:38 AM   #75
harmtemolder
Enthusiast
harmtemolder began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Oct 2020
Device: Kobo Aura
Quote:
Originally Posted by lightmaster View Post
Not getting the error anymore with v0.4.1-beta
Assuming that everything else still works as expected I'll release it then. Thanks for testing!
harmtemolder is offline   Reply With Quote
Reply

Tags
calibre, koreader

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Goodreads Sync kiwidude Plugins 1751 06-08-2024 10:54 AM
[GUI Plugin] Skoob Sync thiago.eec Plugins 24 02-19-2024 10:20 AM
[GUI Plugin] BookFusion Cloud Sync skillachie Plugins 58 04-29-2023 02:42 AM
[GUI Plugin] KyBook3 Sync - replaced karl1c Plugins 45 04-23-2021 06:33 PM
[Gui Plugin] Cloud Sync kerimlcr Plugins 13 03-06-2018 05:13 AM


All times are GMT -4. The time now is 06:04 PM.


MobileRead.com is a privately owned, operated and funded community.