[creepy] 01/01: Extend 02-plugin-directory.patch to load plugin config from correct directory.
Petter Reinholdtsen
pere at moszumanska.debian.org
Sun Nov 16 22:30:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
pere pushed a commit to branch master
in repository creepy.
commit 74949d68bab8c8689efea2f8e1371c2bc79e3b94
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Sun Nov 16 23:30:05 2014 +0100
Extend 02-plugin-directory.patch to load plugin config from correct directory.
---
debian/patches/02-plugin-directory.patch | 134 ++++++++++++++++++++++++++++---
1 file changed, 122 insertions(+), 12 deletions(-)
diff --git a/debian/patches/02-plugin-directory.patch b/debian/patches/02-plugin-directory.patch
index e027bcf..390307f 100644
--- a/debian/patches/02-plugin-directory.patch
+++ b/debian/patches/02-plugin-directory.patch
@@ -6,9 +6,11 @@ Forwarded: no
Reviewed-By: Petter Reinholdtsen <pere at hungry.com>
Last-Update: 2014-11-16
---- creepy-1.2~alpha.orig/creepy/CreepyMain.py
-+++ creepy-1.2~alpha/creepy/CreepyMain.py
-@@ -58,7 +58,7 @@ class MainWindow(QMainWindow):
+Index: creepy/creepy/CreepyMain.py
+===================================================================
+--- creepy.orig/creepy/CreepyMain.py 2014-11-16 23:27:33.471956217 +0100
++++ creepy/creepy/CreepyMain.py 2014-11-16 23:27:34.563969788 +0100
+@@ -58,7 +58,7 @@
def run(self):
pluginManager = PluginManagerSingleton.get()
pluginManager.setCategoriesFilter({ 'Input': InputPlugin})
@@ -17,9 +19,11 @@ Last-Update: 2014-11-16
pluginManager.locatePlugins()
pluginManager.loadPlugins()
locationsList = []
---- creepy-1.2~alpha.orig/creepy/utilities/GeneralUtilities.py
-+++ creepy-1.2~alpha/creepy/utilities/GeneralUtilities.py
-@@ -21,6 +21,9 @@ def getLogDir():
+Index: creepy/creepy/utilities/GeneralUtilities.py
+===================================================================
+--- creepy.orig/creepy/utilities/GeneralUtilities.py 2014-11-16 23:27:33.475956275 +0100
++++ creepy/creepy/utilities/GeneralUtilities.py 2014-11-16 23:27:34.563969788 +0100
+@@ -21,6 +21,9 @@
def reportProblem():
webbrowser.open_new_tab('https://github.com/ilektrojohn/creepy/issues')
@@ -29,9 +33,11 @@ Last-Update: 2014-11-16
def calcDistance(lat1, lng1, lat2, lng2):
"""
Calculate the great circle distance between two points
---- creepy-1.2~alpha.orig/creepy/components/PluginsConfigurationDialog.py
-+++ creepy-1.2~alpha/creepy/components/PluginsConfigurationDialog.py
-@@ -12,7 +12,7 @@ class PluginsConfigurationDialog(QDialog
+Index: creepy/creepy/components/PluginsConfigurationDialog.py
+===================================================================
+--- creepy.orig/creepy/components/PluginsConfigurationDialog.py 2014-11-16 23:27:14.351718093 +0100
++++ creepy/creepy/components/PluginsConfigurationDialog.py 2014-11-16 23:27:34.563969788 +0100
+@@ -12,7 +12,7 @@
# Load the installed plugins and read their metadata
self.PluginManager = PluginManagerSingleton.get()
self.PluginManager.setCategoriesFilter({'Input': InputPlugin})
@@ -40,9 +46,11 @@ Last-Update: 2014-11-16
self.PluginManager.locatePlugins()
self.PluginManager.loadPlugins()
---- creepy-1.2~alpha.orig/creepy/components/PersonProjectWizard.py
-+++ creepy-1.2~alpha/creepy/components/PersonProjectWizard.py
-@@ -102,7 +102,7 @@ class PersonProjectWizard(QWizard):
+Index: creepy/creepy/components/PersonProjectWizard.py
+===================================================================
+--- creepy.orig/creepy/components/PersonProjectWizard.py 2014-11-16 23:27:14.351718093 +0100
++++ creepy/creepy/components/PersonProjectWizard.py 2014-11-16 23:27:34.563969788 +0100
+@@ -102,7 +102,7 @@
'''
self.PluginManager = PluginManagerSingleton.get()
self.PluginManager.setCategoriesFilter({ 'Input': InputPlugin})
@@ -51,3 +59,105 @@ Last-Update: 2014-11-16
self.PluginManager.locatePlugins()
self.PluginManager.loadPlugins()
pluginList = sorted(self.PluginManager.getAllPlugins(), key=lambda x: x.name)
+Index: creepy/creepy/models/InputPlugin.py
+===================================================================
+--- creepy.orig/creepy/models/InputPlugin.py 2014-11-16 23:27:33.471956217 +0100
++++ creepy/creepy/models/InputPlugin.py 2014-11-16 23:28:00.372289747 +0100
+@@ -39,17 +39,17 @@
+
+ def returnPersonalInformation(self, search_params):
+ pass
+- def getConfigObj(self):
+- config_filename = self.name+".conf"
+- config_file = os.path.join(os.getcwdu(),'plugins', self.name, config_filename)
++ def getPluginDir(self):
++ return os.path.join('/usr/share/creepy/plugins', self.name)
++
++ def getConfigObj(self, config_filename = self.name+".conf"):
++ config_file = os.path.join(self.getPluginDir(), config_filename)
+ config = ConfigObj(infile=config_file)
+ config.create_empty=False
+-
++ return config
++
+ def readConfiguration(self, category):
+- config_filename = self.name+'.conf'
+- config_file = os.path.join(os.getcwdu(),'plugins', self.name, config_filename)
+- config = ConfigObj(infile=config_file)
+- config.create_empty=False
++ config = self.getConfigObj()
+ try:
+ options = config[category]
+ except Exception,err:
+@@ -59,10 +59,7 @@
+ return config,options
+
+ def saveConfiguration(self, new_config):
+- config_filename = self.name+'.conf'
+- config_file = os.path.join(os.getcwdu(),'plugins',self.name, config_filename)
+- config = ConfigObj(infile=config_file)
+- config.create_empty=False
++ config = self.getConfigObj()
+ try:
+ config['string_options'] = new_config['string_options']
+ config['boolean_options'] = new_config['boolean_options']
+@@ -72,10 +69,7 @@
+ logger.exception(err)
+
+ def loadSearchConfigurationParameters(self):
+- config_filename = self.name+'.conf'
+- config_file = os.path.join(os.getcwdu(), 'plugins', self.name, config_filename)
+- config = ConfigObj(infile=config_file)
+- config.create_empty = False
++ config = self.getConfigObj()
+ try:
+ params = config['search_options']
+ except Exception, err:
+Index: creepy/creepy/plugins/flickr/flickr.py
+===================================================================
+--- creepy.orig/creepy/plugins/flickr/flickr.py 2014-11-16 23:27:33.471956217 +0100
++++ creepy/creepy/plugins/flickr/flickr.py 2014-11-16 23:28:00.372289747 +0100
+@@ -24,10 +24,7 @@
+
+ def __init__(self):
+ #Try and read the labels file
+- labels_filename = self.name+".labels"
+- labels_file = os.path.join(os.getcwdu(),'plugins', self.name, labels_filename)
+- labels_config = ConfigObj(infile=labels_file)
+- labels_config.create_empty=False
++ labels_config = self.getConfigObj(self.name+".labels")
+ try:
+ logger.debug("Trying to load the labels file for the "+self.name+" plugin .")
+ self.labels = labels_config['labels']
+Index: creepy/creepy/plugins/instagram/instagram.py
+===================================================================
+--- creepy.orig/creepy/plugins/instagram/instagram.py 2014-11-16 23:27:33.471956217 +0100
++++ creepy/creepy/plugins/instagram/instagram.py 2014-11-16 23:28:00.372289747 +0100
+@@ -24,10 +24,7 @@
+
+ def __init__(self):
+ #Try and read the labels file
+- labels_filename = self.name+".labels"
+- labels_file = os.path.join(os.getcwdu(),'plugins', self.name, labels_filename)
+- labels_config = ConfigObj(infile=labels_file)
+- labels_config.create_empty=False
++ labels_config = self.getConfigObj(self.name+".labels")
+ try:
+ logger.debug("Trying to load the labels file for the "+self.name+" plugin .")
+ self.labels = labels_config['labels']
+Index: creepy/creepy/plugins/twitter/twitter.py
+===================================================================
+--- creepy.orig/creepy/plugins/twitter/twitter.py 2014-11-16 23:27:33.471956217 +0100
++++ creepy/creepy/plugins/twitter/twitter.py 2014-11-16 23:28:00.372289747 +0100
+@@ -26,10 +26,7 @@
+
+ def __init__(self):
+ #Try and read the labels file
+- labels_filename = self.name+".labels"
+- labels_file = os.path.join(os.getcwd(),'plugins', self.name, labels_filename)
+- labels_config = ConfigObj(infile=labels_file)
+- labels_config.create_empty=False
++ labels_config = self.getConfigObj(self.name+".labels")
+ try:
+ logger.debug("Trying to load the labels file for the "+self.name+" plugin .")
+ self.labels = labels_config['labels']
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/creepy.git
More information about the Pkg-grass-devel
mailing list