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)
def new_framework(): global af af = alias.ArgumentationFramework('Test') return alias.get_json(af)
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)
def add_argument(arg): global af if af is None: af = alias.ArgumentationFramework('Test') af.add_argument(arg) return alias.get_json(af)
def framework(af_id): global af af = alias.read_tgf(static_file_dir + '/examples/' + af_id + '.tgf') return alias.get_json(af)