Graph¶
Module with functions for processing and analyzing Logseq graph data.
Classes:
| Name | Description |
|---|---|
UniqueSets |
Dataclass to hold unique sets for linked references and aliases. |
LogseqGraph |
Class to handle all Logseq files in the graph directory. |
UniqueSets(linked_refs: set[str] = set(), linked_refs_ns: set[str] = set(), aliases: set[str] = set())
dataclass
¶
Dataclass to hold unique sets for linked references and aliases.
LogseqGraph(index: FileIndex, all_linked_refs: dict[str, dict[str, dict]] = dict(), all_dangling_links: dict[str, dict[str, dict]] = dict(), dangling_links: set[str] = set(), unique: UniqueSets = UniqueSets())
dataclass
¶
Class to handle all Logseq files in the graph directory.
Methods:
| Name | Description |
|---|---|
__post_init__ |
Initialize the LogseqGraph instance. |
process |
Process the Logseq graph data. |
post_process_content |
Post-process the content data for all files. |
process_namespaces |
Post-process namespaces in the content data. |
sort_all_linked_references |
Sort all linked references by count and found_in. |
process_nodes |
Process summary data for each file based on metadata and content analysis. |
find_dangling_links |
Process dangling links in the graph. |
extract_all_dangling_link_data |
Process all dangling links to create a mapping of linked references. |
Attributes:
| Name | Type | Description |
|---|---|---|
report |
dict[str, Any]
|
Generate a report of the graph analysis. |
report: dict[str, Any]
property
¶
Generate a report of the graph analysis.
__post_init__() -> None
¶
Initialize the LogseqGraph instance.
process() -> None
¶
Process the Logseq graph data.
post_process_content() -> None
¶
Post-process the content data for all files.
process_namespaces(f: LogseqFile) -> None
¶
Post-process namespaces in the content data.
sort_all_linked_references() -> None
¶
Sort all linked references by count and found_in.
process_nodes() -> None
¶
Process summary data for each file based on metadata and content analysis.
find_dangling_links() -> None
¶
Process dangling links in the graph.
extract_all_dangling_link_data() -> None
¶
Process all dangling links to create a mapping of linked references.