|
|
|
@ -52,6 +52,25 @@ def parse_cli_arguments():
@@ -52,6 +52,25 @@ def parse_cli_arguments():
|
|
|
|
|
return _normalize_cli_arguments(raw_arguments) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def parse_gui_arguments(): |
|
|
|
|
from gooey import GooeyParser |
|
|
|
|
""" parses command line interface arguments """ |
|
|
|
|
parser = argparse.GooeyParser( |
|
|
|
|
description="Make time series measurements with a Sartorius scale.", |
|
|
|
|
epilog=( |
|
|
|
|
"Times can be specified as 10s, 10m, or 10h" |
|
|
|
|
"for seconds, minutes or hours respectively." |
|
|
|
|
"A relative directory path starts at the Desktop." |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
parser.add_argument("port", nargs="?", default="COM4", metavar="COMPORT", help="Serial Port that connects the Scale, defaults to 'COM4'") |
|
|
|
|
parser.add_argument("-d", "--duration", nargs="?", default="30m", help="Measurement duration, e.g. 10s, 30m, 2h") |
|
|
|
|
parser.add_argument("-i", "--interval", nargs="?", default="10s", help="Measurement interval, e.g. 5s, 1m, 1h") |
|
|
|
|
parser.add_argument("-o", "--output", nargs="?", metavar="DIRECTORY", widget='DirChooser', help="Select Output Directory, defaults to 'Desktop'") |
|
|
|
|
raw_arguments = parser.parse_args() |
|
|
|
|
return _normalize_cli_arguments(raw_arguments) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# helper functions |
|
|
|
|
|
|
|
|
|
|
|
|
|
|