Exemplo n.º 1
0
def upload_file():
    if request.method == 'POST':
        file = request.files['file']
        global af
        file.save(os.path.join("./upload/", file.filename))
        af = alias.read_tgf("./upload/" + file.filename)
        return alias.get_json(af)
Exemplo n.º 2
0
def new_framework():
    global af
    af = alias.ArgumentationFramework('Test')
    return alias.get_json(af)
Exemplo n.º 3
0
def add_attack(attacker, attacked):
    global af
    if af is None:
        af = alias.ArgumentationFramework('Test')
    af.add_attack((attacker, attacked))
    return alias.get_json(af)
Exemplo n.º 4
0
def add_argument(arg):
    global af
    if af is None:
        af = alias.ArgumentationFramework('Test')
    af.add_argument(arg)
    return alias.get_json(af)
Exemplo n.º 5
0
def framework(af_id):
    global af
    af = alias.read_tgf(static_file_dir + '/examples/' + af_id + '.tgf')
    return alias.get_json(af)