Beispiel #1
0
	def process_newitem(self,filename):
		#Check to see if the ext has been configured			
		self.cfg = Config();
		try:
			ext = Tools.get_ext(filename);
			self.logger.debug("Found %s" %ext)
			section = self.cfg.read_config(ext)
		except:
			self.logger.info ("No Config Found for %s" % ext);
			return ();
		
		for all in section:			
			tmp = section[all]
			
			if tmp[:6] == 'plugin':
				self.launch_plugin(section[all],filename) 
			elif tmp[:7] =='builtin':
				self.launch_builtin(section[all],filename)			
Beispiel #2
0
	def find_plugins(self,path):
		search = os.listdir(path);
		
		for all in search:
			#Remove Dir's from the plugin list
			if os.path.isdir(os.path.join(self.path,all)): 
				search.remove(all)
		
		for all in search:
			try:
				if all[:6] == 'plugin':
					logging.info ("found plugin %s" %all)   ## TODO 
			except:
				#remove item from plugin list
				search.remove(all);
		cleansearch = []
		
		#remove .py extension from the list of plugins     ## TODO  Merge this with the try statement
		for all in search:
			cleansearch.append(Tools.rm_ext(all));			
		
		return (cleansearch)