self.outtype = params['outtype']
self.start_path = params['start_path']
self.count = params['count']
+ self.file_filter = params['file_filter'].split(';')
self.stopit = False
self.toplevel = None
def get_data(self):
- return self.outtype, self.start_path, int(self.count)
+ return self.outtype, self.start_path, int(self.count), self.file_filter
def get_stopit(self):
return False
self.search = options.search
- self.params = {}
- self.params['outtype'] = options.output
- self.params['ignore_dirs'] = config['files']['ignore_dirs'] ###
- self.params['start_path'], self.params['count'] = options.params.split()
+ self.options = {}
+ self.options['outtype'] = options.output
+ self.options['ignore_dirs'] = config['files']['ignore_dirs']
+
+ self.params = options.params.split()
+ self.options['start_path'] = self.params[0]
+ self.options['count'] = self.params[1]
+ try:
+ self.options['file_filter'] = self.params[2]
+ except IndexError:
+ self.options['file_filter'] = '*.*'
def _about(self, *a):
print self.abstrac.comments
def show_search_toplevel(self):
search_module = __import__(self.search + '.search')
- search_toplevel = search_module.search.Control('Cli', self.params).run()
+ search_toplevel = search_module.search.Control('Cli', self.options).run()
def run(self):
self.show_search_toplevel()