|
@@ -66,10 +66,15 @@ def _dot() -> None:
|
|
argparser.add_argument(
|
|
argparser.add_argument(
|
|
"paths", nargs="+", metavar="path", help="path to yamily .yml file or folder"
|
|
"paths", nargs="+", metavar="path", help="path to yamily .yml file or folder"
|
|
)
|
|
)
|
|
|
|
+ argparser.add_argument("--comment", dest="comment_text")
|
|
args = argparser.parse_args()
|
|
args = argparser.parse_args()
|
|
collection = yamily.PersonCollection()
|
|
collection = yamily.PersonCollection()
|
|
for path in args.paths:
|
|
for path in args.paths:
|
|
for person in _read(pathlib.Path(path)):
|
|
for person in _read(pathlib.Path(path)):
|
|
collection.add_person(person)
|
|
collection.add_person(person)
|
|
graph = yamily._graphviz.digraph(collection) # pylint: disable=protected-access
|
|
graph = yamily._graphviz.digraph(collection) # pylint: disable=protected-access
|
|
|
|
+ if args.comment_text is not None:
|
|
|
|
+ with graph.subgraph(name="cluster_comment") as comment:
|
|
|
|
+ comment.attr(style="invisible")
|
|
|
|
+ comment.node("comment", label=args.comment_text, shape="none")
|
|
print(graph.source)
|
|
print(graph.source)
|