Files
IPFS-portal/graphify-out/_query2.py
T

18 lines
411 B
Python
Raw Normal View History

import json
from pathlib as Path
from collections import Counter
g = json.loads(Path('graphify-out/graph.json').read_text(encoding='utf-8'))
nodes = g.get('nodes', [])
# Show all unique node labels to understand project structure
types = Counter()
labels = []
for n in nodes:
label = n.get('label', n.get('name', '?'))
labels.append(label)
# Show all labels
for lbl in sorted(labels):
print(lbl)