mirror of
https://github.com/stashapp/CommunityScripts.git
synced 2026-04-28 08:59:52 -05:00
[tagGraph] Update graph from undirected to directed so child tags point to their parents (#51)
This commit is contained in:
@@ -39,7 +39,7 @@ def main():
|
||||
|
||||
|
||||
def create_graph():
|
||||
G = Network(height="1080px",width="1080px")
|
||||
G = Network(height="1080px",width="1080px", directed=True)
|
||||
|
||||
for relation in stash_db.get_tag_relations():
|
||||
parent, child = relation
|
||||
@@ -50,7 +50,7 @@ def create_graph():
|
||||
G.add_node(parent_id, label=parent_name)
|
||||
G.add_node(child_id, label=child_name)
|
||||
|
||||
G.add_edge(parent_id, child_id)
|
||||
G.add_edge(child_id, parent_id)
|
||||
|
||||
curr_path = os.path.dirname(os.path.abspath(__file__))
|
||||
save_path = os.path.join(curr_path, "tag_graph.html")
|
||||
|
||||
Reference in New Issue
Block a user