您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。
 
 
 
 
 
 

29 行
593 B

import sys
import json
# pokus se naimportovat graphviz
try:
from graphviz import Digraph
except ModuleNotFoundError as e:
print("ERROR: Nainstaluj si graphviz - `pip install graphviz`", file=sys.stderr)
exit(1)
# nacist definici grafu
with open("tasks.json", "r") as f:
definition = json.load(f)
dot = Digraph(comment='The Round Table')
# nodes
for task in definition["tasks"]:
dot.node(task["id"], task["id"])
# edges
for task in definition["tasks"]:
for req in task["requires"]:
dot.edge(req, task['id'])
dot.render('out/round-table.gv', view=True)