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 08-26-2024, 08:30 PM   #1876
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,114
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Rei Norshine View Post
Thanks JSWolf for the info.
So, here is the link to the "Home" page of the book listing. https://iheartsapphfic.com/all-categories/ . Once on a specific book's page, you can see the tags that I was hoping to be able to scan and add to the metadata in Calibre. I was hoping to try it on this website as well: https://thelesbianreview.com/
Metadata download plugins are usually developed by the first person who wants them, they will also have an incentive to maintain them when the website changes… as they inevitably do.

BR
BetterRed is offline   Reply With Quote
Old 08-27-2024, 11:56 AM   #1877
Rei Norshine
Junior Member
Rei Norshine began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2024
Device: Fire HD 10 (7th generation)
Quote:
Originally Posted by BetterRed View Post
Metadata download plugins are usually developed by the first person who wants them, they will also have an incentive to maintain them when the website changes… as they inevitably do.

BR
That's what I figured. I was hoping to make one myself, but I have no experience with coding. I tried reading the "Writing your own plugins to extend calibre’s functionality" manual on the Calibre website, but it all goes over my head. I couldn't find a easy tutorial anywhere? If you know of any, it would be appreciated. Or, is it impossible to explain in an "easy" way? Thanks! Rei
Rei Norshine is offline   Reply With Quote
Advert
Old 08-27-2024, 12:06 PM   #1878
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,611
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
IMO, the best approach is to find an existing plugin that does something similar and look at the code for that. There are several metadata plugins that scrape websites.
JimmXinu is offline   Reply With Quote
Old 08-29-2024, 08:56 AM   #1879
Rei Norshine
Junior Member
Rei Norshine began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2024
Device: Fire HD 10 (7th generation)
Quote:
Originally Posted by JimmXinu View Post
IMO, the best approach is to find an existing plugin that does something similar and look at the code for that. There are several metadata plugins that scrape websites.
Which plugin would you suggest trying first? The goodreads one? I assume I have to use Python to modify the plugin. I have no experience with that. How hard would it be for me to learn?
Thanks!
Rei
Rei Norshine is offline   Reply With Quote
Old 08-29-2024, 11:11 AM   #1880
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,611
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
I don't use any metadata plugins. I believe most of them scrape a site somewhere. I'll start with a newer one.

All Calibre plugins are written in python. Open the plugin zip to see the source.

How hard is python to learn? It's very subjective. I learned python working on plugins. But I already knew a half dozen other languages. And proper pythoners seem to hate my code.
JimmXinu is offline   Reply With Quote
Advert
Old 09-17-2024, 11:00 AM   #1881
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,611
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Moderator Notice

Biz's question and follow ups about paragraph splitting moved to new thread.

I was panicking a bit when I saw I suddenly had the most recent post--2 weeks ago.
JimmXinu is offline   Reply With Quote
Old 09-17-2024, 11:15 AM   #1882
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,353
Karma: 6874872
Join Date: Sep 2020
Device: Calibre E-book viewer
Quote:
Originally Posted by JimmXinu View Post

Biz's question and follow ups about paragraph splitting moved to new thread.

I was panicking a bit when I saw I suddenly had the most recent post--2 weeks ago.
Comfy.n is offline   Reply With Quote
Old 09-17-2024, 07:33 PM   #1883
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,114
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by JimmXinu View Post
Moderator Notice

Biz's question and follow ups about paragraph splitting moved to new thread.

I was panicking a bit when I saw I suddenly had the most recent post--2 weeks ago.
Methinks I forgot to press "Submit' on my 'I moved ....' reply.

BR
BetterRed is offline   Reply With Quote
Old 12-01-2024, 06:46 PM   #1884
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 780
Karma: 340954
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Light Mode/Dark Mode Plugin Icons
I have a humble plugin to which I would like to be able to add this function.
I know that there has to be a folder inside the image plugin with two files indicating icon_dark and icon_light. But I don't know what code I should add and where for this purpose. If it's not too much trouble, could someone guide me? I've reviewed some plugins and I feel like I'm not finding something.

Last edited by dunhill; 12-01-2024 at 06:50 PM.
dunhill is online now   Reply With Quote
Old 12-02-2024, 08:31 AM   #1885
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,098
Karma: 1261763
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by dunhill View Post
Light Mode/Dark Mode Plugin Icons
I have a humble plugin to which I would like to be able to add this function.
I know that there has to be a folder inside the image plugin with two files indicating icon_dark and icon_light. But I don't know what code I should add and where for this purpose. If it's not too much trouble, could someone guide me? I've reviewed some plugins and I feel like I'm not finding something.
Did you tried what I suggested via PM? Here is with a detailed explanation (Python 3):

First, put your suffixed icons in the 'images' folder inside your plugin zip file. E.g.: 'images/icon_dark.png', 'images/icon_light.png'.

Place this at the start of your main.py or similar:
Code:
# Check for dark theme
def is_dark_theme():
    return QApplication.instance().is_dark_theme
Then, the get_icon() function:
Code:
def get_icon(icon_name):
    icon_name = 'images/' + icon_name

    # Choose the suffix
    tc = 'dark' if is_dark_theme() else 'light'
    sq, ext = os.path.splitext(icon_name)
    sq = f'{sq}_{tc}{ext}'

    return get_icons(sq)
Then, in your code, use the get_icon() function to retrieve the icon like this:

Code:
icon = get_icon(icon_name.png)
Note that you use the icon name without the suffix (dark/light).

This will allow the plugin to change from light/dark theme when calibre starts. If you want it to change without restarting, than you need to rebuild the menus on the fly. Check out the rebuild_menus() method present in many plugins (ui.py).
thiago.eec is offline   Reply With Quote
Old 12-07-2024, 07:52 PM   #1886
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 780
Karma: 340954
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by thiago.eec View Post
Did you tried what I suggested via PM? Here is with a detailed explanation (Python 3):

First, put your suffixed icons in the 'images' folder inside your plugin zip file. E.g.: 'images/icon_dark.png', 'images/icon_light.png'.

Place this at the start of your main.py or similar:
Code:
# Check for dark theme
def is_dark_theme():
    return QApplication.instance().is_dark_theme
Then, the get_icon() function:
Code:
def get_icon(icon_name):
    icon_name = 'images/' + icon_name

    # Choose the suffix
    tc = 'dark' if is_dark_theme() else 'light'
    sq, ext = os.path.splitext(icon_name)
    sq = f'{sq}_{tc}{ext}'

    return get_icons(sq)
Then, in your code, use the get_icon() function to retrieve the icon like this:

Code:
icon = get_icon(icon_name.png)
Note that you use the icon name without the suffix (dark/light).

This will allow the plugin to change from light/dark theme when calibre starts. If you want it to change without restarting, than you need to rebuild the menus on the fly. Check out the rebuild_menus() method present in many plugins (ui.py).
Now, thank you very much.
dunhill is online now   Reply With Quote
Old Yesterday, 11:45 PM   #1887
Bozana
Bozana
Bozana does all things with Zen-like beautyBozana does all things with Zen-like beautyBozana does all things with Zen-like beautyBozana does all things with Zen-like beautyBozana does all things with Zen-like beautyBozana does all things with Zen-like beautyBozana does all things with Zen-like beautyBozana does all things with Zen-like beautyBozana does all things with Zen-like beautyBozana does all things with Zen-like beautyBozana does all things with Zen-like beauty
 
Bozana's Avatar
 
Posts: 25
Karma: 32224
Join Date: Jan 2013
Device: PC
I have no idea on how to do python or other coding, besides, htm/html and within epubs.

I would like to suggest a plugin, if someone is willing to do one, based on this website:

https://why-choose.com/

As they have loads of tags and books that not found on goodreads.

If anyone has time to write one, it would be greatly appreciated!

Kindest regards,

Bozana
Bozana is offline   Reply With Quote
Old Today, 12:52 AM   #1888
glictimo
Junior Member
glictimo began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2024
Device: Android
A DriveThruRPG plugin. I see stuff available there that I can't find anywhere else. And it's got a lot of sister sites with ebook content as well.
glictimo is offline   Reply With Quote
Reply

Tags
calibre, chatbot, cover, epub fix, epub-fix, google books, kindle, metadata calibre title, missing, pdf, pdf and calibre, plugin development, scribe


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-505 Any ideas what this might be? Neupy Sony Reader 4 07-03-2012 08:19 AM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 01:11 PM
Ideas? mike_bike_kite Which one should I buy? 10 06-13-2010 04:37 PM
Ideas F1Wild Amazon Kindle 4 07-10-2009 07:01 AM


All times are GMT -4. The time now is 09:34 AM.


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