cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Obsidian plugin: Author graphs in Markdown or visualize Obsidian vaults in Neo4j

I created an Obsidian plugin that creates a new and much more functional graph view to Obsidian. It does so by connecting
to a Neo4j database. Features:

  • Color nodes by tags
  • Selective expansion and hiding of nodes
  • Typed links using - linkType [[note 1]], [[note 2|alias]]
  • Hierarchical layout

Obsidian is a very powerful graph-based Markdown editor with many features for quickly authoring complex knowledge graphs.

Installation

  1. Make sure you have Python 3.6+ installed
  2. Make sure you have Neo4j desktop installed
  3. Create a new database in Neo4j desktop and start it. Record the password you use!
  4. In the settings of the plugin, enter the password. Then run the restart command.

Use

On an open note in Obsidian, use the command "Neo4j Graph View: Open local graph of note".

  • Click on a node to open it in the Markdown view
  • Double-click on a node to expand its neighbors
  • Shift-drag in the graph view to select nodes
    • Use E to expand the neighbors of all selected nodes
    • Use H or Backspace to hide all selected nodes from the view
    • Use I (invert) to select all nodes that are not currently selected
    • Use A to select all nodes
  • All notes visited are added to the graph

Possible problems

All changes made in obsidian should be automatically reflected in Neo4j, but this is still very buggy. There also seem to be problems with duplicate nodes in the graph.

Semantics

This collects all notes with extension .md in the input directory (default: markdown/). Each note is interpreted as follows:

  • Interprets tags as entity types
  • Interprets YAML frontmatter as entity properties
  • Interprets wikilinks as links with type inline, and adds content
  • Lines of the format "- linkType [[note 1]], [[note 2|alias]]" creates links with type linkType from the current note to note 1 and note 2.
  • The name of the note is stored in the property name
  • The content of the note (everything except YAML frontmatter and typed links) is stored in the property content
  • Links to notes that do not exist yet are created without any types.

This uses a very simple syntax for typed links. There is no agreed-upon Markdown syntax for this as of yet.
If you are interested in using a different syntax than the list format "- linkType [[note 1]], [[note 2|alias]]",
please submit an issue.

Other visualization and querying options

Another use case for this plugin is to use your Obsidian vault in one of the many apps in the Neo4j desktop Graph Apps Store. Using with this plugin active will automatically connect it to your vault. Here are some suggestions:

3 REPLIES 3

Hello,
thanks for your effort to build this useful plugin, I find it very useful and I am trying to use it.

However I cannot succeed to use it because I obtain an error after installation and activation on my Mac. Maybe you could help.
Here is the trace taken from the console:

Error during initialization of semantic markdown:
Error: Command failed: pip3 install --upgrade semantic-markdown-converter --no-warn-script-location --user
/bin/sh: pip3: command not found

at ChildProcess.exithandler (child_process.js:312)
at ChildProcess.emit (events.js:315)
at maybeClose (internal/child_process.js:1021)
at Socket.<anonymous> (internal/child_process.js:443)
at Socket.emit (events.js:315)
at Pipe.<anonymous> (net.js:674)

But I have pip3 and I am able to execute the command in my shell, and even after having run that command by myself, I relaunch Obsidian and obtain the same error again.
How could I make pip3 visible to Obsidian or Neo4j?

Thank you very much for any help

clem
Graph Steward

Sorry, but I'm confused. When you say "Plug-In", is it a Plug-In for Neo4J? Or is it a Plug-In for Obsidian that can talked to Neo4J?

In either case, I'm not sure where the Plug-In can be found.

I see this page, but I'm not sure what's there.

BTW, I think your project could use a YouTube video to show off what Obsidian can do. I'm not clear on how it works (reading feature list doesn't do it for me.). It does look very interesting but I'm not sure what it can do, especially in relationship with Neo4J, which would be especially interesting.

DC1
Node Link

This is pretty awesome, and I'm an obsidian user!
Does this use the "on the fly" graph that obsidian is creating?

a great benefit of obsidian is that all your data is just plain markdown files, and you can check your vault into a github repo. I think your plugin here is safe with this, as all the data for the graph is still contained in those files? There are no editing features in the graph view that would not be captured in the plain data?

- linkType [[note 1]], [[note 2|alias]]"

so eg I would do - isA [[ford]] [[vehicle]] correct?
i wonder if a more cypher like syntax might get appreciated here?

[[ford]] - isA - [[car]]

you mention about submitting an issue but I'm not sure where to.
Could you add a link to your github repo?

thanks for making this!

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online