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 12-12-2023, 01:58 AM   #1
azuravian
Enthusiast
azuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughing
 
Posts: 31
Karma: 63058
Join Date: Feb 2012
Device: Kobo Aura One
Lightbulb [GUI Plugin] GR Author Notes

Edit 01/13/24:
  • Added option to use Google Translate to translate the author bio into the language of your choice. Can be configured in the plugin config.
  • Cleaned up code

Edit 12/18/23:
  • Added translation for Spanish (courtesy of @dunhill)
  • Added option to skip authors who already have a GR Author Notes bio as their note
  • Cleaned up code

Edit: Updated plugin to manually load the dependencies directly from the zip file without using pip.

With the notes feature in Calibre 7, I thought of a new plugin that I knew I would want, so I wrote it and am sharing it here.

This plugin pulls author information from GoodReads and writes it to the author note.

Everything is organized in a table (see example below) and the background color, border color, and text color can be changed in the plugin configuration. It defaults to the colors shown in the example image.

Currently, it uses a Goodreads function that is also used by Calibre to "guess/search" the author page. This is almost always correct, but if you have an author where a more well-known author has the same name as the author of your book. For example, if you have books by South African novelist Peter Abrahams, Goodreads will return American mystery writer Peter Abrahams instead.

If the author isn't found or if the author exists in Goodreads, but has no biography information, they will be skipped.

Please let me know if you find this useful or have any suggestions.

Example:
Click image for larger version

Name:	KZKudXc.png
Views:	1641
Size:	187.6 KB
ID:	205160

Interface:
Click image for larger version

Name:	V7ffB8W.png
Views:	1595
Size:	12.4 KB
ID:	205162

Configuration:
Click image for larger version

Name:	t1EoV9l.png
Views:	1633
Size:	7.9 KB
ID:	205161
Attached Files
File Type: zip GR Author Notes.zip (3.13 MB, 1474 views)

Last edited by azuravian; 01-13-2024 at 01:43 AM.
azuravian is offline   Reply With Quote
Old 12-12-2023, 02:31 AM   #2
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,283
Karma: 6433040
Join Date: Sep 2020
Device: Calibre E-book viewer
Wheee! Amazing plugin. Just tested it on a book with multiple authors (actually the author plus two translators, from the time when I didn't have a dedicated translator column), and it processed all three smoothly:

Click image for larger version

Name:	MWSnap 2023-12-12, 03_29_59.png
Views:	1604
Size:	263.8 KB
ID:	205163

Comfy.n is offline   Reply With Quote
Advert
Old 12-12-2023, 03:38 AM   #3
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,393
Karma: 12408443
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you, I'll check it this evening.
Terisa de morgan is offline   Reply With Quote
Old 12-12-2023, 07:42 AM   #4
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: 12,038
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@azuravian: I can put this plugin in the "Index of plugins" if & when you are ready for that. The index will link to this thread. Once in that index your plugin will be offered by calibre's plugin install/update mechanism, which offers the zip file in the first post of the thread. It is up to you to change the attachment when you make a new version.

I will need the summary info text you want in the index. If you want donations then I also need the appropriate link.
chaley is offline   Reply With Quote
Old 12-12-2023, 03:16 PM   #5
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,393
Karma: 12408443
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I'm getting this error after installing the plugin:

Spoiler:
Traceback (most recent call last):
File "calibre\gui2\ui.py", line 140, in __init__
File "calibre\gui2\ui.py", line 158, in init_iaction
File "calibre\customize\__init__.py", line 662, in load_actual_plugin
File "importlib\__init__.py", line 126, in import_module
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "calibre\customize\zipplugin.py", line 206, in exec_module
File "calibre_plugins.grauthornotes.ui", line 17, in <module>
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "calibre\customize\zipplugin.py", line 206, in exec_module
File "calibre_plugins.grauthornotes.main", line 7, in <module>
File "calibre_plugins.grauthornotes.unzip", line 32, in install_libs
File "calibre_plugins.grauthornotes.unzip", line 51, in pip_install
File "subprocess.py", line 571, in run
subprocess.CalledProcessError: Command '['python', '-m', 'pip', 'install', '-U', '-t', WindowsPath('D:/Biblioteca Kindle/Configuracion/plugins/gr_author_notes-libs-py3.11'), '--no-deps', 'urllib3==2.1.0']' returned non-zero exit status 9009.
Traceback (most recent call last):
File "calibre\customize\zipplugin.py", line 48, in get_resources
File "zipfile.py", line 1510, in read
File "zipfile.py", line 1547, in open
File "zipfile.py", line 1476, in getinfo
KeyError: "There is no item named 'commit.txt' in the archive"


I guess something is missing in my installation.
Terisa de morgan is offline   Reply With Quote
Advert
Old 12-12-2023, 11:48 PM   #6
azuravian
Enthusiast
azuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughing
 
Posts: 31
Karma: 63058
Join Date: Feb 2012
Device: Kobo Aura One
Quote:
Originally Posted by Terisa de morgan View Post
I'm getting this error after installing the plugin:

Spoiler:
Traceback (most recent call last):
File "calibre\gui2\ui.py", line 140, in __init__
File "calibre\gui2\ui.py", line 158, in init_iaction
File "calibre\customize\__init__.py", line 662, in load_actual_plugin
File "importlib\__init__.py", line 126, in import_module
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "calibre\customize\zipplugin.py", line 206, in exec_module
File "calibre_plugins.grauthornotes.ui", line 17, in <module>
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "calibre\customize\zipplugin.py", line 206, in exec_module
File "calibre_plugins.grauthornotes.main", line 7, in <module>
File "calibre_plugins.grauthornotes.unzip", line 32, in install_libs
File "calibre_plugins.grauthornotes.unzip", line 51, in pip_install
File "subprocess.py", line 571, in run
subprocess.CalledProcessError: Command '['python', '-m', 'pip', 'install', '-U', '-t', WindowsPath('D:/Biblioteca Kindle/Configuracion/plugins/gr_author_notes-libs-py3.11'), '--no-deps', 'urllib3==2.1.0']' returned non-zero exit status 9009.
Traceback (most recent call last):
File "calibre\customize\zipplugin.py", line 48, in get_resources
File "zipfile.py", line 1510, in read
File "zipfile.py", line 1547, in open
File "zipfile.py", line 1476, in getinfo
KeyError: "There is no item named 'commit.txt' in the archive"


I guess something is missing in my installation.
Exit status 9009 refers to a bad path. Looking at the specified path, it appears that you have Calibre installed in a portable install and to a path with a space in the name. I've made a change that might work. I'll attach it to this post. Let me know if it works for you.
Attached Files
File Type: zip GR Author Notes.zip (13.5 KB, 1681 views)
azuravian is offline   Reply With Quote
Old 12-13-2023, 01:17 AM   #7
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,393
Karma: 12408443
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by azuravian View Post
Exit status 9009 refers to a bad path. Looking at the specified path, it appears that you have Calibre installed in a portable install and to a path with a space in the name. I've made a change that might work. I'll attach it to this post. Let me know if it works for you.
Same error, sorry.
Terisa de morgan is offline   Reply With Quote
Old 12-13-2023, 01:41 AM   #8
azuravian
Enthusiast
azuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughingazuravian can shake the floor when laughing
 
Posts: 31
Karma: 63058
Join Date: Feb 2012
Device: Kobo Aura One
Quote:
Originally Posted by Terisa de morgan View Post
Same error, sorry.
If it's not too much trouble, can you try changing the folder name to something without a space. I'd be interested in seeing if that makes the error go away. That will help me determine what path to go down to see if I can fix it.
azuravian is offline   Reply With Quote
Old 12-13-2023, 01:50 AM   #9
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,393
Karma: 12408443
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by azuravian View Post
If it's not too much trouble, can you try changing the folder name to something without a space. I'd be interested in seeing if that makes the error go away. That will help me determine what path to go down to see if I can fix it.
I'll try to test with another library and I'll be back to you.... as the space is in the root folder for all my libraries
Terisa de morgan is offline   Reply With Quote
Old 12-14-2023, 04:30 PM   #10
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,393
Karma: 12408443
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I'm getting the same error because that is not the library... but the configuration folder (and to change that is complicated).
Terisa de morgan is offline   Reply With Quote
Old 12-14-2023, 04:41 PM   #11
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,393
Karma: 12408443
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by azuravian View Post
Exit status 9009 refers to a bad path. Looking at the specified path, it appears that you have Calibre installed in a portable install and to a path with a space in the name. I've made a change that might work. I'll attach it to this post. Let me know if it works for you.
I think the problem is that there are no library to install inside the zip (or I don't see it), and for sure there is no library with that name at the configuration folder.
Terisa de morgan is offline   Reply With Quote
Old 12-14-2023, 05:24 PM   #12
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
At install time, the plugin does not provide the option to add itself to a toolbar or menu as other GUI plugins do, nor does it appear the Available actions list in Toolbars and Menus.

If I try to Configure it in Plugins I get a "You need to restart calibre" message irrespective that I have restarted calibre multiple times, and it's still there after an overnight Windows shutdown and early morning fresh start.

BR
BetterRed is offline   Reply With Quote
Old 12-14-2023, 05:31 PM   #13
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,393
Karma: 12408443
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by BetterRed View Post
At install time, the plugin does not provide the option to add itself to a toolbar or menu as other GUI plugins do, nor does it appear the Available actions list in Toolbars and Menus.

If I try to Configure it in Plugins I get a "You need to restart calibre" message irrespective that I have restarted calibre multiple times, and it's still there after an overnight Windows shutdown and early morning fresh start.

BR

That's my problem too, and it means that it isn't proper installed. I guess if you start calibre in debug mode you'll see a message like mine.
Terisa de morgan is offline   Reply With Quote
Old 12-14-2023, 05:39 PM   #14
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Terisa de morgan View Post
That's my problem too, and it means that it isn't proper installed. I guess if you start calibre in debug mode you'll see a message like mine.
Probably, but I've already uninstalled it.

Maybe Comfy can tell us how he made it work… hint: running from source?

BR
BetterRed is offline   Reply With Quote
Old 12-14-2023, 07:06 PM   #15
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,283
Karma: 6433040
Join Date: Sep 2020
Device: Calibre E-book viewer
Quote:
Originally Posted by BetterRed View Post
Probably, but I've already uninstalled it.

Maybe Comfy can tell us how he made it work… hint: running from source?

BR
I have indeed perceived a long delay upon loading the zip file, like... "Hmm, nothing yet. Did it install correctly? Shouldn't it have already prompted for the plugin button placement on the toolbars?" Then, IIRC, I switched to another task while waiting for something to happen, and when I switched back to Calibre, it did show that prompt.

This, on 7.1 stable (not running from source)
Comfy.n is offline   Reply With Quote
Reply

Tags
author, calibre 7, goodreads, notes, plugin


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Author Book Count Hierarchy DaltonST Plugins 60 04-15-2023 03:38 PM
[GUI Plugin] Author Book Count DaltonST Plugins 55 10-20-2022 12:59 PM
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB lrpirlet Plugins 2 08-18-2022 04:15 PM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 06:25 AM
[GUI Plugin] Sony PRS-T1 notes (handwriting) exporter sjvs Plugins 24 09-27-2012 11:28 AM


All times are GMT -4. The time now is 04:48 AM.


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