Archived
1
0

Added file name option

This commit is contained in:
Harmen Prins 2014-06-17 14:11:50 +02:00
parent 7838ff2773
commit 1797ace7ee
2 changed files with 14 additions and 5 deletions

View File

@ -2,12 +2,11 @@
# Personalize options in your User Interface # Personalize options in your User Interface
# Commonly used parameters are listed in the GUI for easy selection # Commonly used parameters are listed in the GUI for easy selection
CommonParameters = One, Two, Three CommonParameters = Weight, Polarity, Viscosity, Solubility, Name
# Parameters that are always used in the search # Parameters that are always used in the search
AlwaysParameters = Zero, Name AlwaysParameters = Name
# What filetype the output will be saved in # What filetype the output will be saved in
# If just one, will be used without the possibility of selecting another # If just one, will be used without the possibility of selecting another
OutputTypes = csv OutputTypes = csv, jsonlines, json, xml
#jsonlines, json, csv, xml

View File

@ -108,6 +108,16 @@ class GUI():
frame_all_attributes.pack() frame_all_attributes.pack()
frame_output_name = Frame(window)
output_name = StringVar()
output_name.set("results")
variables.update({'output_name': output_name})
label_output_name = Label(frame_output_name, text="Output name:")
input_output_name = Entry(frame_output_name, font=("Helvetica", 12), width=25, textvariable=output_name)
frame_output_name.pack()
label_output_name.pack()
input_output_name.pack()
if output_types and len(output_types) == 1: if output_types and len(output_types) == 1:
output_type = StringVar() output_type = StringVar()
output_type.set(output_types[0]) output_type.set(output_types[0])
@ -117,7 +127,7 @@ class GUI():
output_type.set(output_types[0] if output_types and len(output_types) != 0 else "json") output_type.set(output_types[0] if output_types and len(output_types) != 0 else "json")
variables.update({"output_type": output_type}) variables.update({"output_type": output_type})
frame_output_type = Frame(window) frame_output_type = Frame(window)
label_output_type = Label(frame_output_type, text="Output: ") label_output_type = Label(frame_output_type, text="Extension: ")
if output_types and len(output_types) > 0: if output_types and len(output_types) > 0:
input_output_type = OptionMenu(frame_output_type, output_type, *output_types) input_output_type = OptionMenu(frame_output_type, output_type, *output_types)
else: else: