Archived
1
0

Changed GUI logging

This commit is contained in:
Harmen Prins 2014-06-18 10:37:00 +02:00
parent d6f5ed741a
commit 442ff9140e

View File

@ -122,8 +122,9 @@ class GUI():
frame_logging = Frame(frame_checkboxes) frame_logging = Frame(frame_checkboxes)
variable_logging = BooleanVar() variable_logging = BooleanVar()
variable_logging.set(False) variable_logging.set(True)
input_logging = Checkbutton(frame_logging, text="Verbose logging", variable=variable_logging) input_logging = Checkbutton(frame_logging, text="Verbose logging",
variable=variable_logging, onvalue=False, offvalue=True)
variables.update({'logging':variable_logging}) variables.update({'logging':variable_logging})
frame_logging.pack(side=RIGHT) frame_logging.pack(side=RIGHT)
frame_checkboxes.pack(side=BOTTOM) frame_checkboxes.pack(side=BOTTOM)
@ -160,16 +161,12 @@ class GUI():
def execute_search(self): def execute_search(self):
"""Calls the Fourmi crawler with the values from the GUI""" """Calls the Fourmi crawler with the values from the GUI"""
print self.values
if self.values.get('all_attributes'): if self.values.get('all_attributes'):
attributes = ".*" attributes = ".*"
else: else:
attribute_types = ['attributes', 'Common attributes', 'Always attributes'] attribute_types = ['attributes', 'Common attributes', 'Always attributes']
attributes = ','.join([str(self.values.get(attribute)) for attribute in attribute_types]) attributes = ','.join([str(self.values.get(attribute)) for attribute in attribute_types])
print attributes
arguments = {'--attributes': attributes, arguments = {'--attributes': attributes,
'--exclude': None, '--exclude': None,
'--format': self.values.get('output_type'), '--format': self.values.get('output_type'),
@ -188,6 +185,5 @@ class GUI():
def run(self): def run(self):
"""Starts the window and the search.""" """Starts the window and the search."""
self.window.mainloop() self.window.mainloop()
print self.finish_with_search
if self.finish_with_search: if self.finish_with_search:
self.execute_search() self.execute_search()