2023-10-10 01:46:14 +03:00
|
|
|
from argparse import ArgumentParser
|
|
|
|
|
2023-10-12 04:35:11 +03:00
|
|
|
from g4f.gui import run_gui
|
2023-10-08 15:31:46 +03:00
|
|
|
|
2023-10-10 01:46:14 +03:00
|
|
|
|
2023-10-12 04:35:11 +03:00
|
|
|
def gui_parser():
|
|
|
|
parser = ArgumentParser(description="Run the GUI")
|
|
|
|
parser.add_argument("-host", type=str, default="0.0.0.0", help="hostname")
|
|
|
|
parser.add_argument("-port", type=int, default=80, help="port")
|
|
|
|
parser.add_argument("-debug", action="store_true", help="debug mode")
|
|
|
|
return parser
|
|
|
|
|
|
|
|
|
|
|
|
def run_gui_args(args):
|
2023-10-10 01:46:14 +03:00
|
|
|
host = args.host
|
2023-10-12 04:35:11 +03:00
|
|
|
port = args.port
|
2023-10-10 01:46:14 +03:00
|
|
|
debug = args.debug
|
2023-10-12 04:35:11 +03:00
|
|
|
run_gui(host, port, debug)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
parser = gui_parser()
|
|
|
|
args = parser.parse_args()
|
|
|
|
run_gui_args(args)
|