![]() |
#16 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I understand the desire for an "official" plugin update mechanism, but I feel our time is better spent (for now, at least) on core functionality. Maybe some day ... after the primary goals are accomplished.
|
![]() |
![]() |
![]() |
#17 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
@Kevin, @Diap,
Fair enough. ![]() All I'm saying is, the mere need to host a plugin index shouldn't, in and of itself, be a major blocker. And hey, while we are comparing calibre and Sigil, calibre didn't sprout a plugin updater overnight either. |
![]() |
![]() |
![]() |
#18 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I actually think what Kevin suggested is a very viable solution. The plugin creator(s) will deliver the updates, so why not make them responsible for a kind of update service? Especially when Kevin has been so generous to provide an example code. I am sure that shorter or other variants will pop-up now.
I understand, and agree with, the fact that the plug-in part is separate from Sigil and rightfully so. |
![]() |
![]() |
![]() |
#19 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,485
Karma: 5703586
Join Date: Nov 2009
Device: many
|
I added a Current Version: "0.3.4" line to my ePub3-itizer release page.
Then you could simplify things using regular expressions to be just: Code:
from __future__ import unicode_literals, division, absolute_import, print_function import sys import os import re try: import urllib.request as url_request except ImportError: import urllib2 as url_request _latest_pattern = re.compile(r'Current Version:\s*"([^&]*)&') _version_pattern = re.compile(r'<version>([^<]*)</version>') def check_for_updates(site_url, plugin_path): latest_version = None installed_version = None try: # get the latest version from the plugin release website page req = url_request.Request(site_url) response = url_request.urlopen(req) the_page = response.read() the_page = the_page.decode('utf-8') m = _latest_pattern.search(the_page) if m: latest_version = (m.group(1).strip()) # get installed version of plugin ppath = os.path.join(plugin_path, "plugin.xml") with open(ppath,'rb') as f: data = f.read() data = data.decode('utf-8') m = _version_pattern.search(data) if m: installed_version = m.group(1).strip() except: pass return latest_version, installed_version SITE_URL = "https://www.mobileread.com/forums/showpost.php?p=2973066&postcount=1" PLUGIN_PATH = "/Users/kbhend/Desktop" latest_version, installed_version = check_for_updates(SITE_URL, PLUGIN_PATH) print(latest_version, installed_version) |
![]() |
![]() |
![]() |
#20 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,633
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Off Topic two-penneth worth - I don't think the existing index lists all plugins (e.g. https://www.mobileread.com/forums/sho...d.php?t=268279 ), also I would think there are enough plugins now to warrant having it in alphabetical order.
Could a convention be established such that threads in the Plugins subforum that contain a PI be prefixed with "[Plugin]", and could the 'title' that follows match the index entry, and the the zip file name. Hence, there would be a "[Plugin] Shady Characters" thread, listed in the index as "Shady Characters" and its zip name would be "ShadyCharacters-v??????.zip'. Calibre is not the only software that informs user of updated PIs at run time. Notepad++ and browsers spring to mind. If MR provided RSS feeds for individual fora/subfora, then that would be my preferred notifier. That's how I get notified of updates to plugins for my file manager. BR |
![]() |
![]() |
![]() |
#21 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,485
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Well I have alphabetized the Plugin Index but I do not feel right editing other developers' plugin posts to change the title to "[Plugin] Something" so that is completely up to them.
The Plugin Index will help you find the proper post. As for missing plugins, I was under the impression based on the discussion in that thread that there was an easier way to handle that issue. If that is not the case and the author wants their post in the Plugin Index, I would be more than happy to add it. KevinH |
![]() |
![]() |
![]() |
#22 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
After having to update the Plugin Index, I can tell you it's not THAT hard to keep things alphabetized, but if I ever have to renumber the whole thing again, those numbers are going to disappear.
![]() Last edited by DiapDealer; 12-21-2015 at 01:21 PM. |
![]() |
![]() |
![]() |
#23 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,485
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Feel free to remove them anytime! I only manually renumbered once and that was enough for me.
|
![]() |
![]() |
![]() |
#24 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
If you really want numbering, use
[LIST=1] [*] [*] [*] [*] [/LIST] It auto-numbers it, which is the only remotely sane way of numbering things. ![]() |
![]() |
![]() |
![]() |
#25 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Sanity is overrated.
![]() |
![]() |
![]() |
![]() |
#26 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Following the suggestions made in this thread, I have updated my ePubTidyTool plugin so that it will check this website for updates.
The code is in a self-contained module called checkVersion.py and it uses the version of Beautiful Soup that is built into Sigil. Other plugin developers could, if they wished, extract this file from the zip plugin and use it in their own projects. The plugin can be downloaded from: https://www.mobileread.com/forums/sho...54#post3228354) |
![]() |
![]() |
![]() |
#27 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You could attach the checkVersion.py and it uses to the 'useful plugin code' sticky in the plugin part of the forum. That would make it easier on the developers and I guess that is what that thread is for.
Thanks anyway. |
![]() |
![]() |
![]() |
#28 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,485
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi CalibUser,
Thanks for your checkVerrsion.py code. If you don't mind I would like to modify it to work under both python2.7 and python3.4 and explicitly handle the conversion to unicode/utf-8 to prevent confusion. Is that okay? If so, I will then post the modified version to useful plugin code sticky for others to use. Thanks, KevinH |
![]() |
![]() |
![]() |
#29 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
@KevinH
Quote:
![]() I had a vague idea that soup.prettify() converted the html to utf-8 but I this may not have been correct - I should have checked this. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Firmware Update Kindle Paperwhite Update Warning | dpbmobi | Amazon Kindle | 41 | 08-06-2015 12:04 AM |
WARNING, Do not update your Kindle application | MikeGolf | Kindle Fire | 6 | 02-23-2012 08:11 AM |
iPhone Warning about Stanza 2.1 Update | kjk | Apple Devices | 2 | 02-02-2010 03:44 AM |
warning about 2.9.5 update install | xyzzy | iRex | 3 | 04-26-2007 08:06 AM |