{"id":6378,"date":"2011-09-06T10:55:55","date_gmt":"2011-09-06T14:55:55","guid":{"rendered":"http:\/\/www.schollnick.net\/wordpress\/?p=6378"},"modified":"2011-09-07T11:10:35","modified_gmt":"2011-09-07T15:10:35","slug":"new-indigo-plugin-catalog-plugin-update-system","status":"publish","type":"post","link":"http:\/\/www.schollnick.net\/wordpress\/2011\/09\/new-indigo-plugin-catalog-plugin-update-system\/","title":{"rendered":"New Indigo Plugin Catalog &#038; Plugin Update System (Updated 9\/7\/2011)"},"content":{"rendered":"<p>Indigo v5 has introduced a new Plugin system, to extend the hardware and functionality of the Indigo server. &nbsp;This is a terrific step forward, but there&#8217;s another issue lurking in the background&#8230;.<\/p>\n<p>I won&#8217;t count the number of times where someone has reported a problem with an Attachment script, or plugin, and it has already been fixed&#8230;<\/p>\n<p>I feel that we need to be pro-active, and fix this issue&#8230; &nbsp;Indigo Plugins need a way to check for an updated plugin, to help ensure that the operators know when a new version of a plugin is available. &nbsp;<a href=\"http:\/\/www.indigo-plugins.com\">http:\/\/www.indigo-plugins.com<\/a> is the first step in solving this&nbsp;problem&#8230;<\/p>\n<p>Currently, I am a beginner with Django. &nbsp;I would welcome any assistance from the Indigo Community, in assisting in the creation of this site&#8230;<\/p>\n<p>In a nutshell, the site assists in several different ways:<\/p>\n<ol>\n<li><strong>How can I find new plugins?<\/strong> Try here,&nbsp;<a style=\"color: #7c8cc5;\" href=\"http:\/\/www.indigo-plugins.com\/ListAll\" target=\"_blank\">http:\/\/www.indigo-plugins.com\/ListAll<\/a> .<\/li>\n<li>What information is available through the web site?\n<ol>\n<li>The current Version of the Plugin<\/li>\n<li>What version of Indigo this plugin ahas been tested with<\/li>\n<li>The Price of the plugin (<strong>This is my own future planning. I do not know if this field will ever be used<\/strong>)<\/li>\n<li>What URL downloads can be found at<\/li>\n<li>A Short description<\/li>\n<li>A Long description<\/li>\n<li>Author&#8217;s name<\/li>\n<li>Author&#8217;s web site<\/li>\n<li>Author&#8217;s Email<\/li>\n<li>The Bundle ID of the plugin that Indigo recognizes<\/li>\n<\/ol>\n<\/li>\n<li><strong>How can I be sure that I am running the latest version of a plugin?<\/strong> If the developers enable the Update system built-in to this website, you will be notified in the Indigo log when a newer version of the plugin is released. <\/li>\n<li><strong>How can developers use this to help ensure their plugins are up to date<\/strong>? When you register your plugin at the web site, one of the fields contains the bundle ID of the plugin. &nbsp;The plugin contacts the server, and requests the latest version number of the plugin. &nbsp;When the site returns the version number, the plugin checks to see if it&#8217;s newer. &nbsp;If so, it writes an alert to the log file&#8230; &nbsp;No personal information is ever sent to the server&#8230;<\/li>\n<\/ol>\n<p style=\"font-size: 13px;\"><strong>Technical Details, and the first prototype<\/strong><\/p>\n<p>Demo URL for update server&#8230;<br \/><a style=\"color: #7c8cc5;\" href=\"http:\/\/127.0.0.1:8000\/VersionCheck\/com.schollnick.indigoplugin.External_IP\" target=\"_blank\">http:\/\/127.0.0.1:8000\/VersionCheck\/com. &#8230; xternal_IP<\/a><\/p>\n<p>These are the changes necessary, to make this update engine work&#8230; These are the changes that I made when I updated the External IP Address &amp; Dynamic DNS plugin:<\/p>\n<p>I added the following Globals variables:<\/p>\n<p>plugin_id = r&#8217;com.schollnick.indigoplugin.External_IP&#8217;<br \/>version_check_site = r&#8217;http:\/\/www.indigo-plugins.com&#8217;<br \/>version_check_url = version_check_site + &#8220;\/VersionCheck\/%s&#8221; % plugin_id<\/p>\n<p>In the startup() function:<\/p>\n<p>Added self.VersionCheck ()<br \/><span style=\"white-space: pre;\"><span style=\"white-space: pre;\"> <\/span><\/span><\/p>\n<p><span style=\"white-space: pre;\"><span style=\"white-space: pre;\"> <\/span>def<span style=\"white-space: pre;\"> <\/span>VersionCheck ( self ):<br \/><span style=\"white-space: pre;\"> <\/span>#<br \/><span style=\"white-space: pre;\"> <\/span>#<span style=\"white-space: pre;\"> <\/span>Run a VersionCheck to help ensure that the plugin is up to date<span style=\"white-space: pre;\"> <br \/><\/span> #<span style=\"white-space: pre;\"> <br \/><\/span>data = urllib2.urlopen( version_check_url ).read()<span style=\"white-space: pre;\"> <br \/><\/span>version_found, update_url, plugin_name = data.split(&#8220;,&#8221;)&nbsp;<br \/>self.debugLog (&#8220;Version Check Server reports %s is available.&#8221; % version_found)<span style=\"white-space: pre;\"> <\/span><\/span><\/p>\n<p><span style=\"white-space: pre;\"> <\/span>if float(version_found) &gt; float(self.pluginVersion):<span style=\"white-space: pre;\"> <br \/><\/span> indigo.server.log ( &#8220;A New Version of %s v.%s is available. &nbsp;You can download the upgrade from %s&#8221; % (self.pluginDisplayName, version_found, update_url), type=&#8221;Upgrade&#8221;, isError=True )<span style=\"white-space: pre;\"> <br \/><\/span> #self.browserOpen ( <span style=\"white-space: pre;\"> <\/span>update_url )<\/p>\n<p><span style=\"white-space: pre;\"><\/span><\/p>\n<p>And that&#8217;s it. The server will return the version number of the latest version of the plugin, the URL to find the update, and the Plugin Name. &nbsp;The VersionCheck function will fetch this, and compare that with the existing plugin&#8217;s version number. If the server &#8220;wins&#8221;, then a log message is entered into the log. &nbsp;Optionally (self.browserOpen), a web browser window can be opened to the URL that the server sent.<\/p>\n<p>I am planning to add additional features to the server, but I want to invite all the developers to contact me, so that we can start to register their plugins and enable these features&#8230;&nbsp;<\/p>\n<p>At this point, one missing feature on the server is user registration&#8230; So please email me at Benjamin AT schollnick DOT net, and I&#8217;ll setup an account for you, so that you can enter your plugin information&#8230; (Or you can email it to me&#8230;)<\/p>\n<p>If you have any suggestions, please feel free to send it as well&#8230;<\/p>\n<p>Updated 9\/7\/2011, with the addition of the browser URL &amp; Plugin name, being sent from the update server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Indigo v5 has introduced a new Plugin system, to extend the hardware and functionality of the Indigo server. &nbsp;This is a terrific step forward, but there&#8217;s another issue lurking in the background&#8230;. I won&#8217;t count the number of times where someone has reported a problem with an Attachment script, or plugin, and it has already <a class=\"read-more\" href=\"http:\/\/www.schollnick.net\/wordpress\/2011\/09\/new-indigo-plugin-catalog-plugin-update-system\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[4],"tags":[71,612,516],"_links":{"self":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts\/6378"}],"collection":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/comments?post=6378"}],"version-history":[{"count":0,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/posts\/6378\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/media?parent=6378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/categories?post=6378"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/tags?post=6378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->