mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
better clustering
This commit is contained in:
parent
f2cdc96007
commit
6dba1aaca8
3 changed files with 128 additions and 38 deletions
41
toDot.py
Executable file
41
toDot.py
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
|
||||
|
||||
def group_by_prefix(x, y):
|
||||
|
||||
|
||||
|
||||
# sections = []
|
||||
# with open("asList.json", "r") as generatedFile:
|
||||
# data = json.load(generatedFile)
|
||||
#
|
||||
# # list of all groups of entries that are in the same file
|
||||
#
|
||||
# by_file = {}
|
||||
# for entry in data:
|
||||
# by_file[entry["declaredAt"][0]] = entry
|
||||
#
|
||||
# for file, entry in by_file.items():
|
||||
# def as_cluster(content):
|
||||
# return f"""
|
||||
# subgraph \"{file}\" {{
|
||||
# {content}
|
||||
# }}
|
||||
# """
|
||||
#
|
||||
# buffer = []
|
||||
# for arc in entry["definedBy"]:
|
||||
# for defsite in entry["declaredAt"]:
|
||||
# if arc != defsite:
|
||||
#
|
||||
# buffer += [
|
||||
# f"\"{arc}\" -> \"{".".join(entry["optionPath"])}\";"
|
||||
# ]
|
||||
#
|
||||
# if len(buffer) > 0:
|
||||
# sections += [ as_cluster("\n".join(buffer)) ]
|
||||
#
|
||||
# content = "\n".join(sections)
|
||||
# print("digraph {\n compound=true;\n" + content + "\n}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue