Juggl (Out now! 1.0.1): A completely interactive, stylable and expandable graph view plugin!

Doable! In fact, I’m working on this as we speak :slight_smile: I’m not very adept in Javascript though so this may take a bit.

This makes sense! But I’m afraid this is not very general: It works for your use case, but I’d prefer to implement functionality that’s less specific to one use case first. Ideally, like you mentioned with Aspen, such syntax could be defined by the user themselves.

1 Like

Would it be possible load the script with parsing procedures during runtime just like the Obsidian files themselves?
For start, script could be imperative in some easy to learn programming language, with your current procedure as default template that could be modified. Submit parsed relations, properties, … through some API. Later we could share/download documented examples / code snippets like we did/do with CSS.
Given example with bill of materials is not meant to be implicit default syntax, It should be explicitly defined within the vault (e.g. as the procedural script for parsing). Other use cases will have different structure, word order, … aimed for another properties, …

I get this error when running smdc --input
File “C:\Users\Eier\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\py2neo\database\work.py”, line 190, in create
create = subgraph.db_create
AttributeError: ‘dict’ object has no attribute ‘db_create

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "C:\Users\Eier\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\smdc.exe_main
.py", line 7, in
File “C:\Users\Eier\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\smdc\convert.py”, line 14, in main
convert(args)
File “C:\Users\Eier\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\smdc\convert.py”, line 9, in convert
return FORMAT_TYPES[args.output_format].write(notes, args)
File “C:\Users\Eier\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\smdc\format\neo4j.py”, line 67, in write
tx.create(node_graph)
File “C:\Users\Eier\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\py2neo\database\work.py”, line 192, in create
raise TypeError(“No method defined to create object %r” % subgraph)
TypeError: No method defined to create object {‘name’: ‘’, ‘content’: ‘’, ‘obsidian_url’: ‘obsidian://open?vault=Matrix&file=.md’}

Initially, it would be helpful recognizing multiline extension of the original grammar
- linkType [[note 1]], [[note 2|alias]]
i.e.

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

Next independent steps could be:
2. ignoring optional colon and spaces after “linkType”
3. ignoring text after the link, to allow for comments
4. recognizing also markdown style links
5. recognizing both, space and tab based indentation (not necessary to recognize mixed, for simplicity)
6. allowing to combine multiple links on one line with multi-line version, e.g. like this:

- linkType: (the colon is optional)
	- [[note 1]], [[note 2|alias]] optional comment after last consecutive link on the line
	- [[note 3]]
	- [[note 4]], [[note 5]], [[note 6]]
  • advantage of mixed version: allows to annotate list items by end-line comments while saving screen space by chaining non-annotated items in as few lines as possible.

Some good ideas here. I really like the multiline extension! That could be a useful one. I’ll add it to my todo list :slight_smile:
I would also like to add something like a comment functionality, though I’m not quite sure what this would look like yet.

1 Like

I like that your first recognized syntax - linkType [[note 1]], [[note 2|alias]] is able to utilize a lot of already existing notes written in common/natural way without need to transform whole vault to fit your tool.
If your choice of comment functionality can have the same effect, it would be great.
(i.e. recognizing even more relations from surrounding likely omittable text)
Especially for the time while there is no Obsidian integration with customizable method like Aspen.

This was an issue in Windows with a library I’m using. Should be fixed in the new release (use pip install --upgrade semantic-markdown-converter). I also fixed some other crashes. Performance should be a bit better, too!

I like that your first recognized syntax - linkType [[note 1]], [[note 2|alias]] is able to utilize a lot of already existing notes written in common/natural way without need to transform whole vault to fit your tool.

Indeed, I wanted to start off with something simple but effective! But there’s definitely a lot of options here.

The Obsidian plugin is out!!

Adds 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
4 Likes

I was able to make it work but only with a very small set of short Obsidian notes. It failed when I tried to load my default vault with hundreds of larger documents. I’ll debug the process and try to understand if the problems are related with the plugin or my python+Neo4j configuration. I’ll put those comments on hold for now because what really matters at this stage is:

This is amazing work, Emile! It’s my top Obsidian priority coming true. The opportunity for deeper analysis and extraction of insights from large vaults is huge. Thank you!

A small suggestion, if I may: many Obsidian users don’t have Python or Neo4j installed and won’t know how to setup things. Would it be possible to have a step by step tutorial on everything required to make the plugin work?

It’s possible to skip basic installation steps for Neo4j, for example, but some additional guidance would be great - especially on the Python side of things and the activation commands for the plugin.

Is any of the great Obsidian Youtubers reading this post that could help with a step by step guide to reference from the plugin?

Keep up with the fantastic work, Emile. I suspect this will be my favorite and most useful plugin going forward.

Joao

3 Likes

It failed when I tried to load my default vault with hundreds of larger documents.

That’s likely an error on my side. I’ll be looking into skipping these errors soon. Can you run it in debug mode (Settings -> Debug), then show what’s in the Developers console?

This is amazing work, Emile! It’s my top Obsidian priority coming true. The opportunity for deeper analysis and extraction of insights from large vaults is huge. Thank you!

That’s awesome to hear!! I’m glad that this is of help :slight_smile: And yeah, that’s exactly the goal!

Would it be possible to have a step by step tutorial on everything required to make the plugin work?

That’s a good idea indeed. Installation does seem to be the bottleneck to a lot of people right now. I can make a Youtube video myself somewhere this holiday if that is of help.

Thank you for the nice comments! And do let me know if you have any more suggestions :slight_smile:

Thanks for the quick reply, Emile.

I’ll try to run this soon… because family has the top priority at this time of the year, it will take a few days.

My work revolves around the exploration of large documents (that I currently import to Obsidian), identifying and connecting topics to generate new ideas and publish my own documents. Graph analytics is tremendously helpful for that activity.

Having said that, I do have many suggestions to make as a result of my daily work and after spending several months playing with Neo4j, TigerGraph and other solutions, trying to get to what you delivered so nicely integrated with Obsidian.

Again, give me a few days and I’ll send a list of ideas to help make this a MUST HAVE plugin to understand networked thoughts in Obsidian. I’ll be very happy if you develop any of those ideas.

I’ll be waiting for that tutorial video. Thanks in advance for that.

2 Likes

Of course! Happy holidays :slight_smile:

Very cool indeed. It’s somewhat similar to what I do as well (exploring what topics exist in academic papers). Graph analytics indeed helps me a lot (especially subset hierarchies on topics).

That sounds great! Would be very interested in hearing them :slight_smile: (But no hurry, especially now!).

I have not been able to get the plugin to work…

I have Python 3.9 installed, Neo4j Desktop 1.3.11 installed.
I ran pip install --upgrade semantic-markdown-converter successfully.
I started a new database, set a password, and started the database. Then give the password to the plugin settings on Obsidian. Then restarted the plugin.
But it just keeps initializing the stream. I cannot see the graph, even on a very simple vault with 3 linked notes.

Please let me know if there is something I need to do differently, any help will be greatly appreciated :slight_smile:

Hi there! Can you enable debug in the plugin settings, then open the developers tools? This is under the view menu on Mac, and something like ctrl+shift+k/i on Windows

Neo4j Graph View is updated to v0.2.0! New stuff :sparkles:

  • You can now use .json to individually style nodes and edges by tags or by folders.
  • Images in notes linked to with wikilinks are now displayed as images in the graph
  • Fixed styling of hoverboxes. These can now be styled using css.
  • Minor interaction bug fixes

2 Likes

Hello there, thank you very much for this plugin!

I managed to make it work after some error
(I needed to remove the line “from future import annotations” because I don’t know how to make it work with a newer version of Python (I use conda), and also fixed line 143 in server.py),
and I see in console: “Stream is active!”…

But I don’t know how to use it
please help me since I cannot find anywhere the command
“Neo4j Graph View: Open local graph of note”

I think this should be very simple but I’m new to Obsidian and either Neo4j…
Thanks very much again!

Hi! Thank you for the bug report (and even fixing it!) I wasn’t aware __future__ isn’t backwards compatible. I’ll fix that!

You can open the command selection screen with ctrl/cmd+P. Then you can use the filter to find the command. Alternatively, you can assign this command to a hotkey in the settings. I’ll be sure to make this clearer!

EDIT: May I ask what version of the plugin you’re using? server.py has been renamed a while ago. And what version of Python?

Thank you very much!

Right now the plugin installed is 0.2.1, on Ubuntu 18.04, but I probably messed up with installing the repo both from cloned git and with pip, so I ended up with errors coming from such a path:
“~/.local/lib/python3.6/site-packages/smdc/note.py” and similar.
I could not find a way to choose a python version.
Maybe I’ll try other installation in different computers.

Anyway on Mac I already have difficulty because in console an error appear, pip3 not found, and I don’t know as well where to specify a python installation. I can install with pip3 from shell but it is conda python, while the plugin is searching for another python somewhere else…

…Great plugin! I can see the graph finally! :smiley:
Is there a way to show the complete vault graph instead of local notes?

I haven’t tested on Ubuntu yet, so there might be issues there. It looks like you’re using Python 3.6, which in my tests is running just fine…

Have you installed Python 3 in your system? Ie, https://www.python.org/downloads/ instead of Conda? The plugin looks for your system-installed Python 3, not for conda python.

I’m happy to hear that!

Yes: you can do the following: Add the code block to a note:

```cypher
MATCH (n)
RETURN n LIMIT 100
```

This finds 100 nodes in the graph (you can increase the count, but no guarantees that your computer can handle this!). Put your cursor on that code block, then execute the Obsidian command: “Execute Cypher query”.

Oh thank you very much for your prompt answers!

I find this combination of Obsidian and Neo4j very helpful for note taking and knowledge base building.
I bet this project will grow big!

1 Like