Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-28-2021, 10:05 AM   #2251
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Shadowjack View Post
I am getting the following error/message in my comments field on my kobo when i look at the details for my books. "Plugboard template error name 'unichr' is not defined..."

I recently upgraded to the latest version of calibre (5.18) and plugins (for a long time I stayed with 4.23).

The only template i am using with the plugboard is
epub:KOBOTOUCHEXTENDED = ([{pubdate:|<div>Published: |</div>}{rating:rating_as_stars()|<div>Rating: |</div>}
{#pages:|<div>Page count: |} \ {#words:|Word count: |</div>}{tags:|<div>Tags: |
</div>}<hr/>{comments}] -> comments)

Thoughts?
How is the function "rating_as_stars" defined? I have one defined as a user template function. That uses "unichr". For calibre 5, it needs to be changed to import the module "six" and to use "six.unichr". But, calibre now has the function "rating_to_stars" which does the same thing and can handle half stars. Just replacing "rating_as_stars" with "rating_to_stars" should do work

Also, this isn't a plugin problem. It is a metadata plugboard. The same plugboard could be used for any device.
davidfor is offline   Reply With Quote
Old 05-28-2021, 11:54 AM   #2252
Shadowjack
Enthusiast
Shadowjack began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Apr 2009
Location: Champaign, IL
Device: Sony PRS-500, PRS-505, PRS-650, Kobo H2O, H2Ov2, Libra H2O
Thank you, using "rating_to_stars" fixed the problem. Much appreciated.
Shadowjack is offline   Reply With Quote
Old 05-28-2021, 04:27 PM   #2253
Phil_C
Addict
Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.
 
Phil_C's Avatar
 
Posts: 236
Karma: 391602
Join Date: Oct 2009
Location: Chicago, IL USA
Device: Sony PRS-350; Kobo Clara HD; Kobo Clara 2E
I'm fiddling with this function in my plugboard, but can't get it to show half stars. It uses a column for Goodreads ratings in the format x.xx.

Tried:

rating_to_stars(value,use_half_stars)
rating_to_stars(value,1)
rating_to_stars(value,use_half_stars=1)

...and more, but I guess I don't understand what to do. I get only whole stars.

How do I get half stars to work?
Phil_C is offline   Reply With Quote
Old 05-28-2021, 09:32 PM   #2254
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Phil_C View Post
I'm fiddling with this function in my plugboard, but can't get it to show half stars. It uses a column for Goodreads ratings in the format x.xx.

Tried:

rating_to_stars(value,use_half_stars)
rating_to_stars(value,1)
rating_to_stars(value,use_half_stars=1)

...and more, but I guess I don't understand what to do. I get only whole stars.

How do I get half stars to work?
The way to use it is:

Code:
rating_to_stars(value,1)
But, the value is a number between 0 and 5. And it rounds the number to the half star. So, 1.5, 1.8 and 1.99999 will all be one and a half stars. It seems to work here.

If you are still having problems, I would suggest asking in the Library Management sub-forum. That will get the attention of @chaley who has been working on the template functions.
davidfor is offline   Reply With Quote
Old 05-28-2021, 10:02 PM   #2255
Phil_C
Addict
Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.Phil_C ought to be getting tired of karma fortunes by now.
 
Phil_C's Avatar
 
Posts: 236
Karma: 391602
Join Date: Oct 2009
Location: Chicago, IL USA
Device: Sony PRS-350; Kobo Clara HD; Kobo Clara 2E
That is one way I tried, but still no half stars. I will post in the other forum. Thank you!
Phil_C is offline   Reply With Quote
Old 05-30-2021, 11:45 AM   #2256
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,639
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question: was the 'change reading status' dialog removed? I can still do it by using restore bookmark or update metadata but I can't find the menu option.

EDIT: I am dumb. It was there but I had to switch to Device first.
ownedbycats is offline   Reply With Quote
Old 05-30-2021, 08:23 PM   #2257
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by ownedbycats View Post
Question: was the 'change reading status' dialog removed? I can still do it by using restore bookmark or update metadata but I can't find the menu option.

EDIT: I am dumb. It was there but I had to switch to Device first.
It is also included in the Update Metadata dialog if you are looking at the library.
davidfor is offline   Reply With Quote
Old 06-01-2021, 04:20 AM   #2258
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Update to version 2.14.0 - ToC Updater

I have just released a new version of the plugin. The only change it the addition of the ToC Updater that is in the "recent" beta. There were some minor since the beta, but, the basics are the same.

The change list for this release is:
  • New: ToC updater.

The details of how to use this are in the original post for the beta or the help.

Calibre will announce the update in the next hour or so. If there are any problems with plugin, please report them here.
davidfor is offline   Reply With Quote
Old 06-06-2021, 08:03 AM   #2259
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,639
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question: Aside from selecting every book to run "Update ToC", is there a way to check for out-of-date TOCs?
ownedbycats is offline   Reply With Quote
Old 06-06-2021, 08:44 AM   #2260
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by ownedbycats View Post
Question: Aside from selecting every book to run "Update ToC", is there a way to check for out-of-date TOCs?
No. I would look at the modified date and work out if it it more recent than when the book was sent to the device.
davidfor is offline   Reply With Quote
Old 07-01-2021, 03:24 PM   #2261
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,244
Karma: 7400001
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Forma, Libra 2, Clara 2E, Kindle Oasis3, Voyage
Question Database backups not being created

Having always manually performed backups, I recently attempted to setup automated backups. However, after configuring for each device separately, no backup files are being created, having checked each individual directory for evidence of a file. I've also performed a search of the entire referenced drive and only my manual backups exist. To confirm I had not missed something, I referenced the help file. I have done the following for each device (first time all devices, second attempt only one device). What am I missing?

[Device this profile is for: selected]
  1. Check only the specific device
  2. Check "Configure options for all devices"
  3. Check "Backup the device database on each connection"
  4. Destination: a specific existing directory
  5. Copies to keep: 5
  6. Click on "OK" and restarted Calibre

v 2.14.0
Calibre 5.22.1
Skydog is offline   Reply With Quote
Old 07-01-2021, 04:53 PM   #2262
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
FWIW, that appears to work fine on my end (Linux).

Anything wonky about the destination path (e.g., !ascii)?
NiLuJe is offline   Reply With Quote
Old 07-01-2021, 05:10 PM   #2263
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,244
Karma: 7400001
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Forma, Libra 2, Clara 2E, Kindle Oasis3, Voyage
Quote:
Originally Posted by NiLuJe View Post
FWIW, that appears to work fine on my end (Linux).

Anything wonky about the destination path (e.g., !ascii)?
Not that I am aware of unless... it doesn't like the external drive, but it's the same drive I use for the Calibre library and manual device database backups. (Win 10 laptop)
Skydog is offline   Reply With Quote
Old 07-02-2021, 12:17 AM   #2264
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Skydog View Post
Having always manually performed backups, I recently attempted to setup automated backups. However, after configuring for each device separately, no backup files are being created, having checked each individual directory for evidence of a file. I've also performed a search of the entire referenced drive and only my manual backups exist. To confirm I had not missed something, I referenced the help file. I have done the following for each device (first time all devices, second attempt only one device). What am I missing?

[Device this profile is for: selected]
  1. Check only the specific device
  2. Check "Configure options for all devices"
  3. Check "Backup the device database on each connection"
  4. Destination: a specific existing directory
  5. Copies to keep: 5
  6. Click on "OK" and restarted Calibre

v 2.14.0
Calibre 5.22.1
That looks correct. But, when the device is connected, does it have an entry in the list that is an icon under "Status". If it doesn't, then the it won't have device specific options. The device is identified using the ids that are in driveinfo.calibre. If that file gets recreated for some reason (a factory reset will remove it) the device needs to be added to the list again. It probably should be using the serial number or something, but, there are a couple of things about the identification that makes that not as simple as it should be.

And for the record, the profiles on the first tab are not connected to the settings on the second tab. The profiles can use the devices, but, they do not include the settings on that page.
davidfor is offline   Reply With Quote
Old 07-02-2021, 02:27 AM   #2265
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,244
Karma: 7400001
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Forma, Libra 2, Clara 2E, Kindle Oasis3, Voyage
To be honest, I don't recall ever noticing a connection status. I assumed, incorrectly, that since I had always made manual backups that automated ones would work as well. What happens "under the hood" that is different between manual/automated?

Currently there are four devices listed in the plugin, all of which display the correct s/n. There have been no factory resets, only patching applied with each firmware update (and Calibre 4.23 => 5.xx). I'll check for status icons at first available opportunity tomorrow, then should I just remove all devices and start from scratch?
Skydog is offline   Reply With Quote
Reply

Tags
kobo, kobo utilities


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Manga plugin mastertea Plugins 6 01-06-2022 02:43 AM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 05:25 AM
Kobo Utilities Plugin Question nikev Kobo Reader 10 09-25-2018 11:55 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 03:05 PM.


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