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, 04:10 AM   #1
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
Plugin update warning?

Perhaps it would be feasible to have Sigil check every now and then if there is an update of a plugin available. Just a check as far as I am concerned, no need for automatic download and install.
I often forget to update the plugins or even to check if there is a new version available. Could be that I am the only one though.
Toxaris is offline   Reply With Quote
Old 12-16-2015, 04:27 AM   #2
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: 73,970
Karma: 128903378
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 Toxaris View Post
Perhaps it would be feasible to have Sigil check every now and then if there is an update of a plugin available. Just a check as far as I am concerned, no need for automatic download and install.
I often forget to update the plugins or even to check if there is a new version available. Could be that I am the only one though.
Your just used to Calibre telling you when a plugin has been updated. I do agree that would be nice if Sigil did the same thing.
JSWolf is offline   Reply With Quote
Advert
Old 12-16-2015, 05:21 AM   #3
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
Doesnt require this a repository? Currently everything is "hidden" in Post's as an attachment,
rubeus is offline   Reply With Quote
Old 12-16-2015, 07:37 AM   #4
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes, but each plugin developer's plugin code could query their own plugin's date or filename right on MR and download its updated self.

In other words, you do your own update check pointing to wherever you make your plugin available. This should be doable in python quite easily.
KevinH is offline   Reply With Quote
Old 12-16-2015, 09:45 AM   #5
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
Quote:
Originally Posted by KevinH View Post
This should be doable in python quite easily.
Not for me
rubeus is offline   Reply With Quote
Advert
Old 12-16-2015, 09:56 AM   #6
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Once I get Sigil-0.9.2 out there (hopefully before the holidays), I will put together a code fragment that does this by example (unless someone beats me to it)

KevinH
KevinH is offline   Reply With Quote
Old 12-16-2015, 12:02 PM   #7
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
Super Kevin, that would work as well of course.
Toxaris is offline   Reply With Quote
Old 12-16-2015, 01:33 PM   #8
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi,

Here is a little snippet of code to give the general idea. I put this together quickly to give you some idea of how to go about this. I am sure a simpler/tighter version is possible but this works in my testing for both python and python3

Code:
from __future__ import unicode_literals, division, absolute_import, print_function

import sys
import os
from quickparser import QuickXHTMLParser

try:
    import urllib.request as url_request
except ImportError:
    import urllib2 as url_request


def check_for_updates(site_url, plugin_path):
    plugin_name = None
    version = None
    ps = QuickXHTMLParser()

    try:
        # get the most up to date release version info
        # looks for the name of the current Mobileread Attachment
        # You could easily add current version info anyplace on the site
        req = url_request.Request(site_url)
        response = url_request.urlopen(req)
        the_page = response.read()

        # you could replace all of the parsing with simple regular 
        # expressions here as well
        ps.setContent(the_page)
        get_plugin_name = False
        for (text, tagprefix, tname, ttype, tattr) in ps.parse_iter():
            if text is not None:
                if get_plugin_name:
                    plugin_name = text
                    break
            elif tname == "a" and "href" in tattr:
                href = tattr["href"]
                if href.startswith("attachment.php?"):
                    get_plugin_name = True;
    except:
        pass

    # now get the current version of the installed plugin
    try:
        ppath = os.path.join(plugin_path, "plugin.xml")
        get_version = False
        with open(ppath,'rb') as f:
            data = f.read()
            ps.setContent(data)
            for (text, tagprefix, tname, ttype, tattr) in ps.parse_iter():
                if text is not None:
                    if get_version:
                        version = text
                        break
                elif tname == "version"and ttype == "begin":
                    get_version = True
    except:
        pass
    return plugin_name, version


SITE_URL = "https://www.mobileread.com/forums/showpost.php?p=2973066&postcount=1"
PLUGIN_PATH = "/Users/kbhend/Desktop"
plugin_name, version = check_for_updates(SITE_URL, PLUGIN_PATH)
print(plugin_name, version)
The path to the plugin directory would have to be properly determined inside the plugin (not my hard coded path here) and if I had bothered to put the current version someplace on the MR website I would not have had to parse to find the attachment name.

Using regular expression would probably make the code shorter. As I said, I just threw this together to illustrate how things could be done in a way that works on both python 2.7 and python 3.4.

After I get more time I will clean this up and add a specific current version info to the first post on the ePub3-itizer MR site to make this even simpler.

KevinH

Last edited by KevinH; 12-16-2015 at 01:46 PM.
KevinH is offline   Reply With Quote
Old 12-16-2015, 01:47 PM   #9
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi,
FWIW, we could probably use the sigil_bs4 soup interface and find command to make this even easier.
KevinH
KevinH is offline   Reply With Quote
Old 12-16-2015, 02:28 PM   #10
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: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I think it would be better if Sigil did this instead of relying on the plugin makers to do it. We've seen some plugins for Calibre be killed off because they didn't get updated. I see the same thing happening (some not getting updated).
JSWolf is offline   Reply With Quote
Old 12-16-2015, 02:44 PM   #11
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi JSWolf,

Not a chance. Sigil is not in the plugin development business. The only exception is the flightcrew plugin which was previously part of Sigil. Sigil has no interest in controlling or centralizing plugins for plugin developers. As volunteer developers, we simply do not have the time to keep up or manage a repository for plugins.

The key for Sigil is to keep the interface as simple as possible and to allow plugin developers full reign in their own world to do what they want as long as they do not violate the plugin launcher interface.

As for plugins dying off, we only have 18 or so plugins, and as far as I know, they all still work. I have been careful to make the plugin launcher interface as backwards compatible as possible while still fixing bugs.

In other words, if you want to check for updates you do it for your own plugin with whatever code you want. It is only handful of lines in python to do the above.

KevinH
KevinH is offline   Reply With Quote
Old 12-16-2015, 02:46 PM   #12
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Unless of course ... someone wants to volunteer their time and server space to manage all plugins and keep them up to date! Any takers?

KevinH
KevinH is offline   Reply With Quote
Old 12-16-2015, 02:49 PM   #13
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: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Why not use the plugin forum? Just check if there's an update in the given thread?
JSWolf is offline   Reply With Quote
Old 12-16-2015, 03:04 PM   #14
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
All Sigil needs to do is scrape a plugin index and then scrape individual threads for updates.
Or you can store the plugin index in the Sigil repository and scrape the individual threads.


Yes, I know calibre hosts the calibre plugin index. That doesn't mean Sigil needs to as well.
eschwartz is offline   Reply With Quote
Old 12-16-2015, 03:28 PM   #15
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Sigil is not going to do that. The plugin can do that just as easily and with much less web traffic since it will only check when your own plugin is run. It is still screen scraping either way.

In fact some smart person could write a screen scraper plugin that updates other plugins installed by the user.

As they say in textbooks, "this will be left as an exercise for the reader".

Last edited by KevinH; 12-16-2015 at 03:54 PM.
KevinH 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 07:38 PM.


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