Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2017, 05:10 PM   #1
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,221
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Problem with my ScrambleEbook plugin and the Plugin Updater tool

I need to make a small change to my ScrambleEbook plugin (to remove some calibre metadata from epub3 books). However, before I do I noticed that the Plugin Updater tool doesn't think it is currently installed - even though it is. It currently appears in the 'Not installed' list.

This problem has probably existed since initial release - there haven't been any updates so far. I could be wrong but I think the problem may be that the Plugin Updater thinks the plugin is called "Scramble Ebook" (with a space) but the code inside the plugin's __init__.py file has "name = 'ScrambleEbook'" (no space).

What is the best way to fix this so that when I release the updated version current users will see that there's an update?

Perhaps this post should be in the Plugins subforum but I wanted to make sure that it would be read by someone with the correct forum privileges.
jackie_w is offline   Reply With Quote
Old 01-18-2017, 05:30 PM   #2
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 would like the answer to this as well as my "CleanComments" plugin has a similar problem
Terisa de morgan is offline   Reply With Quote
Advert
Old 01-18-2017, 10:38 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,535
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm somewhat confused, if you look at https://plugins.calibre-ebook.com/ you will see that the plugins name is ScrambleEbook without the space. The calibre code to check for plugin updates uses that site to get the names, not MR. You can see in detail what goes on in calibre, by looking at the read_available_plugins() function and get_installed_status() function in plugin_updater.py

Stick a few print statements in there to see why your plugin is not being detected as installed.
kovidgoyal is offline   Reply With Quote
Old 01-19-2017, 12:34 AM   #4
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,221
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
It's too late tonight so I'll have to look at print statements tomorrow.

However, just in case I didn't explain myself well enough, my calibre installation has no problem installing, assigning to toolbar, running the plugin. It's just that after restarting calibre the master 'Plugin Updater' tool lists "Scramble Ebook" in its "not installed" filtered list and doesn't list "ScrambleEbook" at all.

I've checked my plugin code and I don't see any occurrences of "Scramble Ebook" (with space) at all, only "ScrambleEbook".

In addition, in case any are relevant:
  • the plugin zipfile in the config directory after installation is called ScrambleEbook.zip (no space).
  • It shows as "ScrambleEbook (0.0.4)" in the list Prefs - Plugins - User Interface Action plugins
  • I did notice that the MR "Index of Plugins" thread shows it as "Scramble Ebook" (with space)
jackie_w is offline   Reply With Quote
Old 01-19-2017, 01:13 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,535
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This should take care of it

https://github.com/kovidgoyal/calibr...209add0f491274
kovidgoyal is offline   Reply With Quote
Advert
Old 01-19-2017, 07:56 AM   #6
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,221
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Thank you. I'll post the update to the main plugin thread shortly.

Does this mean that only current users who upgrade past v2.77 will be able to see the update in the Plugin Updater?

Would editing the "Index of Plugins" to remove the space make the update visible to more current users?
jackie_w is offline   Reply With Quote
Old 01-19-2017, 08:00 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,535
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, editing the index of plugins to have the name match what is __init__.py will fix it for everyone, within an hour.
kovidgoyal is offline   Reply With Quote
Old 01-19-2017, 08:25 AM   #8
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,221
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by kovidgoyal View Post
Yes, editing the index of plugins to have the name match what is __init__.py will fix it for everyone, within an hour.
OK, thanks. I've now added the update zip and changed the version history in the main plugin thread.

Please remind me whether I need to do anything else to make the auto-magic happen.

A secondary question ... I noticed that downloads in the main plugin thread showed as 21000+ but downloads shown on the https://plugins.calibre-ebook.com/ link were only about 10% of that. The number of "active" users posting scrambled books to MR is only a small fraction of either of those but I'd still like to understand the difference.
jackie_w is offline   Reply With Quote
Old 01-19-2017, 08:28 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,535
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I have no idea where the number on MR comes from. The number on plugins.calibre-ebook.com is the number of times the zip file corresponding to that plugin was downloaded by calibre, regardless of version.

Someone has to update the Index of plugins thread to use ScrambleEbook as the plugin name. I cant do it at the momnet as I am on a cell phone, and trying to edit that enormaous post is impossible, so hopefully one of the other moderators will do it for you.
kovidgoyal is offline   Reply With Quote
Old 01-19-2017, 09:05 AM   #10
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,504
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by kovidgoyal View Post
Yes, editing the index of plugins to have the name match what is __init__.py will fix it for everyone, within an hour.
Done.

Also updated version number and release date in that list.
pdurrant is offline   Reply With Quote
Old 01-19-2017, 09:09 AM   #11
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,221
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Thank you pdurrant
jackie_w is offline   Reply With Quote
Old 01-19-2017, 04:21 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: 20,997
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Terisa de morgan View Post
I would like the answer to this as well as my "CleanComments" plugin has a similar problem
@Terisa de Morgan - if you create a new version of your PI with a consistent value for 'name' in __init__.py, and the zip file (i.e.'CleanComments'), as per your GetFileName PI, then the MR thread name, and the index can be updated to reflect that name.

The inclusion of an '; Uninstall: NormComment' directive at the end of the MR Index entry should take care of replacing existing 'NormComment' installs, see the 'FanFicFare' and 'KindleUnpack - The Plugin' index entries at MR and calibre-ebook.com. I'll ask JimmXinu to chime in here and confirm this is correct.

BR
BetterRed is offline   Reply With Quote
Old 01-19-2017, 05:46 PM   #13
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,590
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by BetterRed View Post
...
The inclusion of an '; Uninstall: NormComment' directive at the end of the MR Index entry should take care of replacing existing 'NormComment' installs, see the 'FanFicFare' and 'KindleUnpack - The Plugin' index entries at MR and calibre-ebook.com. I'll ask JimmXinu to chime in here and confirm this is correct.
Unfortunately, I have very little wisdom to offer here.

When I replaced FanFictionDownLoader with FanFicFare, thducks posted suggesting that there was a Deprecated section that FanFictionDownLoader could be moved to and then helped do so.

A little later, there was discussion with eschwartz and thducks about adding an Uninstall flag for FFDL, which was eventually resolved.

To be honest, I didn't pay a huge amount of attention, since the index thread is outside my control. But what BR says appears to be correct: A plugin's entry in the index thread can tell calibre to uninstall a predecessor PI. But it has to be done juuust right.

Last edited by JimmXinu; 01-19-2017 at 11:13 PM. Reason: BR, not MR.
JimmXinu is offline   Reply With Quote
Old 01-19-2017, 09:56 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: 20,997
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Thanks Jim

Maybe theducks and Kovid can add their wisdom.

BR

Last edited by BetterRed; 01-19-2017 at 10:09 PM.
BetterRed is offline   Reply With Quote
Old 01-19-2017, 11:49 PM   #15
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,535
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1) Make sure the MR index plugin name and the name you declare in __init__.py are exactly the same

2) If they are not currently exactly the same, simply change the name in the MR Index thread via a request to a moderator. There is no need to uninstall anything, the MR index name is only used by the plugin updater dialog not the rest of calibre -- so changing the index name should be all that is required to fix the problem

3) This problem will not occur in the future since I fixed the plugin updater to use the internal name instead of the MR name when checking for installed status.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 02:25 AM
[GUI Plugin] ScrambleEbook: Getting help with copyrighted books jackie_w Plugins 38 05-19-2022 06:23 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 03:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 01:11 PM


All times are GMT -4. The time now is 05:19 AM.


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