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 10-03-2020, 06:54 PM   #16
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,543
Karma: 129670952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
Leave the old Python 2 version available for them would seem to be the simplest solution.
But can there be two plugin with the same name? There is no way for Calibre to know if a plugin is Calibre 5 compatible or not. So what happens? If there is a name change, anyone using this plugin who is not on MR won't know it's the same plugin just for Calibre 5.
JSWolf is online now   Reply With Quote
Old 10-03-2020, 07:45 PM   #17
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,515
Karma: 145748890
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
But can there be two plugin with the same name? There is no way for Calibre to know if a plugin is Calibre 5 compatible or not. So what happens? If there is a name change, anyone using this plugin who is not on MR won't know it's the same plugin just for Calibre 5.
Add a minimum version check so the Python 3 version won't install on a calibre version less than 5. Ghod knows enough plugins already have that minimum version check baked in.

Look at the Job Spy plugin for example. In it's root __init__.py, you find the following lines:

Code:
    name                    = 'Job Spy'
    description           = JS_DESCRIPTION
    supported_platforms     = ['windows', 'osx', 'linux']
    author                  = 'DaltonST'
    version                 = (1, 0, 184)
    minimum_calibre_version = (4, 6, 0)    # originally 2.49.0
Change that tuple to (5,0,0) and happily forget Python 2.
DNSB is offline   Reply With Quote
Advert
Old 10-03-2020, 10:38 PM   #18
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,543
Karma: 129670952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
Add a minimum version check so the Python 3 version won't install on a calibre version less than 5. Ghod knows enough plugins already have that minimum version check baked in.

Look at the Job Spy plugin for example. In it's root __init__.py, you find the following lines:

Code:
    name                    = 'Job Spy'
    description           = JS_DESCRIPTION
    supported_platforms     = ['windows', 'osx', 'linux']
    author                  = 'DaltonST'
    version                 = (1, 0, 184)
    minimum_calibre_version = (4, 6, 0)    # originally 2.49.0
Change that tuple to (5,0,0) and happily forget Python 2.
But what about the Python 2 compatible version? How would that e handled along side a Python 3 version with the same name?
JSWolf is online now   Reply With Quote
Old 10-04-2020, 02:29 PM   #19
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,515
Karma: 145748890
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
But what about the Python 2 compatible version? How would that e handled along side a Python 3 version with the same name?
Not sure but at some point during the calibre 3 beta's, I seem to remember that a maximum_calibre_version was mentioned. Set the old Python 2 only plugins to a maximum_calibre_version of 4,30,0 and should stop the install on calibre 5. The name may need to be changed but that's a matter for the plugin authors.
DNSB is offline   Reply With Quote
Old 10-04-2020, 05:01 PM   #20
thiago.eec
Guru
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: 946
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by JSWolf View Post
But what about the Python 2 compatible version? How would that e handled along side a Python 3 version with the same name?
If the minimum version is set to 5.0.0, those that already installed the plugin, and are staying on version 4.23, will keep their version, since calibre won't update the plugin. They will keep using last compatible version for Python 2. Those with version 5 or later will receive the update.

Only a new user of the plugin, using a Python 2 calibre, won't be able to install it, since they won't have access to a Python 2 version of the plugin.
thiago.eec is offline   Reply With Quote
Advert
Old 10-05-2020, 02:29 PM   #21
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,543
Karma: 129670952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
Not sure but at some point during the calibre 3 beta's, I seem to remember that a maximum_calibre_version was mentioned. Set the old Python 2 only plugins to a maximum_calibre_version of 4,30,0 and should stop the install on calibre 5. The name may need to be changed but that's a matter for the plugin authors.
But how will those on 4.23 going to see it in the plugin list?

How will it work to have a Python 2 and a Python 3 version of the same plugin with the same name? Change the name and those that want it won't get it or get it updated.
JSWolf is online now   Reply With Quote
Old 10-05-2020, 02:29 PM   #22
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,543
Karma: 129670952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by thiago.eec View Post
If the minimum version is set to 5.0.0, those that already installed the plugin, and are staying on version 4.23, will keep their version, since calibre won't update the plugin. They will keep using last compatible version for Python 2. Those with version 5 or later will receive the update.

Only a new user of the plugin, using a Python 2 calibre, won't be able to install it, since they won't have access to a Python 2 version of the plugin.
But that's the problem that I think needs to be solved.
JSWolf is online now   Reply With Quote
Old 10-05-2020, 04:32 PM   #23
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,946
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by JSWolf View Post
But how will those on 4.23 going to see it in the plugin list?

How will it work to have a Python 2 and a Python 3 version of the same plugin with the same name? Change the name and those that want it won't get it or get it updated.
It is only a problem for New users of Down Rev installations.
There will not be any updates for existing users on those, so they have no further need to SEE the update list.

It has already been suggested that Python 3 ONLY PI simply make the Calibre Minimum 5.0.
To all BACKUP your config folders NOW. then all you need to do is install Calibre (the pre-5.x) and restore the config folder (has all the users PI that remain valid)
theducks is offline   Reply With Quote
Old 10-05-2020, 04:54 PM   #24
thiago.eec
Guru
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: 946
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by JSWolf View Post
But that's the problem that I think needs to be solved.
If the plugin is only python3 compatible, then there's no way to address this automatically.

If you create another plugin just for python3, existing users won't be notified about that. If you update this one, then new users on 4.23 won't be able install it.

A reasonable solution would be posting the last python2 version on separate post (maybe the second post of plugin thread). But it still won't work automatically. New user on 4.23 would have to know about the plugin and download it from here.

The thing is: I don't even think this is a real problem. How often a new user of calibre would install an old version, and also want this specific plugin?
thiago.eec is offline   Reply With Quote
Old 10-05-2020, 05:42 PM   #25
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: 20,656
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
This plugin is not in the Index so it must be installed from file - a'la the deDRM PI.

The first post does not conform to the format required by the Plugin Updater, and the author has not asked the moderators to add the plugin to the Index, which they wouldn't do anyway because the first…

I suggest the author take care of previous versions on the Github repo, in the same way as Sigil does.

BR
BetterRed is offline   Reply With Quote
Old 10-06-2020, 03:15 PM   #26
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,543
Karma: 129670952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
If a plugin has a version that only works with Python 2 Calibre and a version that only works with Python 3 Calibre, how do you make it so those on PY2 can get the plugin and those on PY3 can get the plugin but the name is not changed for either of them? That's the problem. That (IMHO) is what needs to be fixed in Calibre 5.x as well as Calibre 5 not showing any plugins not PY3 ready.
JSWolf is online now   Reply With Quote
Old 10-11-2020, 05:35 AM   #27
steinarb
Enthusiast
steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.
 
Posts: 27
Karma: 53696
Join Date: Nov 2012
Device: Sony PRS T-1
Quote:
Originally Posted by jhowell View Post
You should probably update the minimum_calibre_version in your plugin's __init__.py file.
Done: https://github.com/steinarb/opds-rea...05a952de8c9339
steinarb is offline   Reply With Quote
Old 10-11-2020, 05:42 AM   #28
steinarb
Enthusiast
steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.steinarb is no e-book dilettante.
 
Posts: 27
Karma: 53696
Join Date: Nov 2012
Device: Sony PRS T-1
Quote:
Originally Posted by JSWolf View Post
But there are people who cannot run Calibre 5 but can run 4.23. What about them?
If they don't do a "git pull" on the plugin (I've never packaged it), then it should continue to work.

If they do a "git pull" by mistake, this should fix it:
Code:
cd ~/git/opds-reader
git checkout -b calibre4-compatible 8b79f9b
cd calibre_plugin
calibre-customize -b .
steinarb is offline   Reply With Quote
Old 10-11-2020, 07:42 AM   #29
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,543
Karma: 129670952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
It's not an issue of git.It's an issue of the plugin system built into Calibre. If you have the same plugin but one runs on PY3 and the other on PY2, there is no way to give the user the correct version based on which version of Calibre is being used. You would have to setup two different threads with the same named plugins. I don't know if Calibre's plugin system can even handle multiple plugins with the same name.
JSWolf is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
COPS : Calibre OPDS WordPress Plugin PetrusV Related Tools 9 12-28-2020 08:22 AM
ios reader plugin for calibre emsteel123 Plugins 3 07-08-2016 07:54 AM
New Cloud Storage + OPDS Plugin needs testers QuietThyme Development 15 12-08-2015 05:13 AM
Moon+ reader & multipile Calibre OPDS feeds ? g8dhe Android Devices 0 10-08-2012 09:23 AM
Reader Library disappeared after upgrade nikev Sony Reader 0 12-19-2009 11:33 PM


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


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