-
Notifications
You must be signed in to change notification settings - Fork 32
Home
Welcome to the obsidiantools wiki! This wiki gets more into the technical detail beyond the demo.
These are some differences in how the NetworkX graph in this package appears versus the graph in the Obsidian app, which I don't want to change as I think these differences are more intuitive for graph analysis:
- The graph will include 'self loops', but the Obsidian app does not show these. For example, if note
foo
has a wikilink[[foo#bar]]
, then the graph will show afoo->foo
link, but the Obsidian app would not show a 'self loop'. - The package will show
foo
inbacklinks_index
/wikilinks_index
keys, as 'note names', if both these conditions hold: i)foo
file doesn't exist yet; ii) the only wikilinks in the vault to the note are via a header (e.g.[[foo#bar]]
). In the Obsidian app, the graph will have the non-existent note labelled asfoo#bar
, but I think it's more intuitive to think of all the MD files in the graph as a notes, rather than having notes and note sections as graph node labels. - If note
foo
has many wikilinks tobar
, the package's graph will include an edge (arrow) for each wikilink, whereas the Obsidian app will only show one arrow. For example, iffoo
has 4 links tobar
, there will be 4foo->bar
edges stored in the graph.
The graph won't reflect the Obsidian app's graph if you use relative paths to notes in your wikilinks like [[.foo]]
& [[..bar]]
.
That's a bit too complex for the package to cover. The package tries to capture behaviour of the 'Shortest path when possible' setting for new links.
The vault.graph
will reflect these graph settings in the Obsidian app:
You can make a subgraph via these recipes to change the 'Existing files only' and 'Orphans' settings.
There is no way yet to include 'Tags' or 'Attachments' in the obsidiantools graph.
The philosophy of obsidiantools so far has been to focus on the notes themselves as entities in a graph. That way, it's possible to do graph analysis on your notes and do NLP analytics on your notes, complementing what you can do in the Obsidian app.
Create a list of graph nodes, nodes_list
, and make an object of the subgraph via this snippet:
G = vault.graph.subgraph(nodes_list).copy()
Now, the nodes_list
examples below can give you ideas of how to reflect changes to 'Existing files only' and 'Orphans' settings.
nodes_list = list(set(vault.graph.nodes())
.difference(set(vault.isolated_notes)))
nodes_list = list(set(vault.graph.nodes())
.difference(set(vault.nonexistent_notes)))