Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2015, 03:36 PM   #16
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is offline   Reply With Quote
Old 12-16-2015, 03:37 PM   #17
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Old 12-16-2015, 03:42 PM   #18
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 12-16-2015, 03:49 PM   #19
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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)
KevinH is offline   Reply With Quote
Old 12-16-2015, 04:33 PM   #20
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,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
BetterRed is offline   Reply With Quote
Old 12-18-2015, 10:53 AM   #21
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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
KevinH is offline   Reply With Quote
Old 12-21-2015, 09:01 AM   #22
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is offline   Reply With Quote
Old 12-21-2015, 10:03 AM   #23
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is offline   Reply With Quote
Old 12-21-2015, 12:12 PM   #24
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Old 12-21-2015, 01:21 PM   #25
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sanity is overrated.
DiapDealer is offline   Reply With Quote
Old 12-22-2015, 10:07 AM   #26
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
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)
CalibUser is offline   Reply With Quote
Old 12-22-2015, 11:23 AM   #27
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 12-22-2015, 01:07 PM   #28
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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
KevinH is offline   Reply With Quote
Old 12-23-2015, 08:32 AM   #29
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
@KevinH

Quote:
Originally Posted by KevinH View Post
Thanks for your checkVersion.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.
No problem

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.
CalibUser is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 09:57 PM.


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