Graph view : a network visualization script for DT

A few updates on this script:

  • It now is more robust : instead of injecting data in an external file, it generates a HTML file for the graph in your global Inbox. Which means if the graph were buggy, just send it to me in PM for analysis.
  • it covers now three types of links: wiki-links in markdown files (pink edges), x-devonthink-item links in URL of record (green edges), and parent-child relationships (blue edges).
  • the rendering got faster (on a boosted MBP13): (40 nodes, 50 edges) in (3s generating+ 1s layouting), (200n,150e) in (8s + 5s), (500n, 450e) in (35s+8s).

How to use it?
Redownload from https://github.com/benoitpointet/devonthink-graph-view and follow the instructions on https://github.com/benoitpointet/devonthink-graph-view/blob/main/README.md

What if you encounter problems or have wishes?
PM me in this forum. Thx to @rkaplan and @macula for helping me improve it in the past days.

Some snapshots

3 Likes

This is amazing - Thank you. This is exactly what I have been looking for. I’m a non-techie and never played with apple script but I like figuring things out so should be able to provide some instructional feedback. Thanks again - I’m sooo excited about this.

1 Like

FRench First English After
Bonjour Ă  tous.
Je souhaiterais pouvoir utiliser le script de visualisation.
Je ne suis pas spĂ©cialiste , j’ai essayĂ© de trouver la rĂ©ponse en lisant, mais je ne trouve pas.
OĂč dois je, dans quel rĂ©pertoire (enfin je suppose) mettre :

  • devonthink-graph-view (le contenu du zip)
  • RegexAndStuffLib (oĂč le placer , comment le lancer)
    Si vous avez un post oĂč tout cela est expliquĂ©, je suis preneur
    Vous remerciant

Hello to all.
I would like to be able to use the viewer script.
I’m not a specialist, I tried to find the answer by reading, but I can’t find it.
Where should I, in which directory (well I suppose) put :

  • devonthink-graph-view (the content of the zip)
  • RegexAndStuffLib (where to place it, how to launch it)
    If you have a post where all this is explained, I’m interested.
    Thanking you

Put it in ~/Library/Script Libraries/RegexAndStuffLib.scptd

Not sure but according to the beginning of the thread you could probably put the whole content of the zip into

~/Library/Application Scripts/com.devon-technologies.think3/Menu/

Thanks a lot for goog tips @pete31.
I try to find (but don’t)
~/Library/Script Libraries/
~/Library/Application Scripts/ Directory

I look inside

  • /Library/
  • /System/Library/
  • Devonthink Packet

I also delog from my work account , and try with the root account 

Not Better :confused:

I use Big OSX 

I will continue to try

but thanks you a lot @pete31

If you do not have the folders @pete31 mentioned, you could maybe create them and put the files there. But if you have DT3 installed, ~/Library/Application\ Scripts/com.devon-technologies.think3/ definitely does exist.
You’re aware that ~ is an abbreviation for /Users/<your user name>/ ?

1 Like

In Finder press SHIFT+CMD+G. This opens a dialog in which you can paste a path.

Paste this one ~/Library/Application Scripts/com.devon-technologies.think3/Menu/ and put the zip‘s contents in the folder.


Then press the shortcut again and paste this path ~/Library/Script Libraries/.

It‘s possible that it won’t take you to the folder. If that’s the case paste this path ~/Library/. In this folder create a folder „Script Libraries“ and put the RegexAndStuffLib.scptd into it.

Thanks you for all good tips (thanks you so much)
For the moment it’s no working but i not sure of the way to use.
I just select a corpus (several doc) and use the script Menu 

Nothing happen :confused: I will try again tomorow with a Fresh Mind :slight_smile:
Thanks for your help all have good night

It’s the script available in the script menu? Is anything reported in DT’s log window?

I just retried it on the latest DT version: 3.6.2.
It works like a charm.

A note on its location, it is robust enough to be run from outside of DT as well, that is you merely need to have 1 or many items selected in a DT window and then run the script.

1 Like

Lovely - all working and such pretty graphs!
Really nice @benoit.pointet You are star.
Thank you

1 Like

Hello all : i was FAULTY.
I check yesterday & cut and paste and check several time Yesterday Evening 

BUT i have to be honest
i create folder Script Librarie (Without S at end ^^ (Dyslexia my love)
So the process is right and now the script is Running & Graphing
THX ALL

2 Likes

I recognize to be a rather beginner user of Devonthink.
I sincerely thank you for all your help with the installation and running the scripts.
I did manage to run the script but I only have a point cloud, with no link. I guess the links between the files come from a peculiarity.
A) I tried without success : a group of

  • PDF
  • Mardown
  • Hmtl
    B) I tried to annotate by putting the link
  • to a doc (x-devonthink-item://8D97 
)
  • to an Url (html)
    C) I also tried with the Tags


It is clear that there is something I am missing.
If a charitable soul would be kind enough to advise me on the post, or the process, I would be very grateful.

Wishing you a good weekend to all

Hi @Bizcom , The script as it is now does not graph all possible relationships between two DT items, but only the ones described here: GitHub - benoitpointet/devonthink-graph-view

So if you select some doc hierarchy, you will see the parent-child relationship graphed.
If you use wiki links 
 all the same.

Hope that helps.

I know many other possible link types and it would definitely help me to know who has what needs. No promises though :wink:

Thanks you i start to get : Node & Different Color.
Thanks all very much

Hoping someone can help – I am clearly doing something silly this side.

Downloaded RegexAndSuff – see it is now on v 1.0.7.
Since I didn’t have a ~Library/Script Libraries folder, I went and created it, and placed the RegexAndStuff unzipped folder into it.

Placed the entirety of the devonthink-graph-view unzipped folder inside the com.devon-technologies.think3/Menu/ folder.

When running the script from the DT3 menu, nothing happens, regardless of what I have selected/searched.

When double-clicking on the DTGraphView.applescript script, it opens in my script editor.
There I noticed that RegexAndStuff was still described as use script "RegexAndStuffLib" version "1.0.6", so I changed this to 1.0.7.

However, it is not allowing me to save the change, since when trying to save, or compiling, the error returns Syntax Error Can't get script "RegexAndStuffLib"

So, I’m presumably putting the RegexAndStuffLib in the wrong place?

Any suggestions?

The script file itself needs to be placed directly in `~/Library/Script Libraries/, not in a sub-foder.

2 Likes

That did the trick – many thanks – I had it placed inside its own subfolder, as it was when unzipped.

Thank you for all the work put into this, very cool implementation!

2 Likes

One user of Obsidian had the idea to stream his collection of notes to Neo4j, creating a graph database. Not only is the visualisation really good, one can then consider all sorts of analysis. I have no clue whether this could work with DT but the idea sounds brilliant. Here is his Obsidian note about the idea: Using the Neo4j Graph View - Obsidian Publish

hi! i installed this and got an empty HTML file in the end. it looks likes this. let me know if i did something wrong, if you don’t mind! i’m excited about this!