-
Notifications
You must be signed in to change notification settings - Fork 0
/
__main__.py
38 lines (33 loc) · 1.08 KB
/
__main__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), 'graph_editor'))
from parallelization import paint_lgraph_from_file
from graph_editor.screen import Screen
import argparse
parser = argparse.ArgumentParser(description='Grounded-L graph visualizer')
parser.add_argument(
'-i',
'--input-file',
help='File with the input graph. '
'Defauls to empty graph'
)
parser.add_argument(
'-o',
'--output-file',
help='File to save the output of graph editor to. '
'This has nothing to do with the grounded-l representation. '
'Defaults to \'graph.txt\''
)
class Args:
def __init__(self, input_file=None, output_file=None):
self.input_file = input_file
self.output_file = output_file
if __name__ == '__main__':
args = parser.parse_args(namespace=Args)
s = Screen(
submit_fn=paint_lgraph_from_file,
submit_button_text='Paint lgraph',
submit_button_tooltip='Paint grounded lgraph representation of current graph',
input_file=args.input_file,
output_file=args.output_file,
)