# Graph view : a network visualization script for DT

**URL:** <https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782>\
**Category:** DEVONthink\
**Tags:** automation\
**Created:** [October 8, 2020, 8:08pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782 "2020-10-08T20:08:28Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![benoit.pointet](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/benoit.pointet/32/9018_2.png) [@benoit.pointet](https://discourse.devontechnologies.com/u/benoit.pointet)\
**Post date:** [October 18, 2020, 10:21am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/21 "2020-10-18T10:21:14Z")

</div>

**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](https://github.com/benoitpointet/devonthink-graph-view) and follow the instructions on [https://github.com/benoitpointet/devonthink-graph-view/blob/main/README.md](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**

 ![Graph of test database displaying all features and cases](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/a/5/a558fee2afe5a55726c167e520db0280d0381b24.jpeg)

 ![Graph of 500 search results on a topic](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/0/e/0e0d0e897eae5d2c2b859e3e8a2baf447df3d5d5.jpeg)

---

<div class="post-metadata">

**Author:** ![Platothefish](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/platothefish/32/20687_2.png) [@Platothefish](https://discourse.devontechnologies.com/u/Platothefish)\
**Post date:** [October 27, 2020, 12:01pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/22 "2020-10-27T12:01:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bizcom](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bizcom/32/11669_2.png) [@Bizcom](https://discourse.devontechnologies.com/u/Bizcom)\
**Post date:** [February 11, 2021, 8:42am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/23 "2021-02-11T08:42:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [February 11, 2021, 9:15am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/25 "2021-02-11T09:15:22Z")

</div>

> [@Bizcom](#):
>
> RegexAndStuffLib (where to place it, how to launch it)

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

> [@Bizcom](#):
>
> Where should I, in which directory (well I suppose) put :
> 
> - devonthink-graph-view (the content of the zip)

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/`

---

<div class="post-metadata">

**Author:** ![Bizcom](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bizcom/32/11669_2.png) [@Bizcom](https://discourse.devontechnologies.com/u/Bizcom)\
**Post date:** [February 11, 2021, 12:36pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/26 "2021-02-11T12:36:04Z")

</div>

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 😕

I use Big OSX …  
I will continue to try

but thanks you a lot @pete31

---

<div class="post-metadata">

**Author:** ![chrillek](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/chrillek/32/29340_2.png) [@chrillek](https://discourse.devontechnologies.com/u/chrillek)\
**Post date:** [February 11, 2021, 12:51pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/27 "2021-02-11T12:51:58Z")

</div>

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>/` ?

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [February 11, 2021, 12:52pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/28 "2021-02-11T12:52:01Z")

</div>

> [@Bizcom](#):
>
> I look inside
> 
> - /Library/
> - /System/Library/
> - Devonthink Packet

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.

---

<div class="post-metadata">

**Author:** ![Bizcom](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bizcom/32/11669_2.png) [@Bizcom](https://discourse.devontechnologies.com/u/Bizcom)\
**Post date:** [February 11, 2021, 4:33pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/29 "2021-02-11T16:33:39Z")

</div>

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 😕 I will try again tomorow with a Fresh Mind 🙂  
Thanks for your help all have good night

---

<div class="post-metadata">

**Author:** ![chrillek](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/chrillek/32/29340_2.png) [@chrillek](https://discourse.devontechnologies.com/u/chrillek)\
**Post date:** [February 11, 2021, 5:25pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/30 "2021-02-11T17:25:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![benoit.pointet](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/benoit.pointet/32/9018_2.png) [@benoit.pointet](https://discourse.devontechnologies.com/u/benoit.pointet)\
**Post date:** [February 11, 2021, 7:10pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/31 "2021-02-11T19:10:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Platothefish](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/platothefish/32/20687_2.png) [@Platothefish](https://discourse.devontechnologies.com/u/Platothefish)\
**Post date:** [February 12, 2021, 9:05am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/32 "2021-02-12T09:05:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bizcom](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bizcom/32/11669_2.png) [@Bizcom](https://discourse.devontechnologies.com/u/Bizcom)\
**Post date:** [February 12, 2021, 1:42pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/33 "2021-02-12T13:42:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bizcom](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bizcom/32/11669_2.png) [@Bizcom](https://discourse.devontechnologies.com/u/Bizcom)\
**Post date:** [February 13, 2021, 8:31am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/34 "2021-02-13T08:31:49Z")

</div>

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

 ![Capture d’écran 2021-02-13 à 09.21.37](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/b/2/b2df252412d0dbc0bdcb3a55dd6102cf176ff979.png)

---

<div class="post-metadata">

**Author:** ![benoit.pointet](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/benoit.pointet/32/9018_2.png) [@benoit.pointet](https://discourse.devontechnologies.com/u/benoit.pointet)\
**Post date:** [February 13, 2021, 8:47am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/35 "2021-02-13T08:47:41Z")

</div>

> [@Bizcom](#):
>
> It is clear that there is something I am missing.

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](https://github.com/benoitpointet/devonthink-graph-view#usage)

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 😉

---

<div class="post-metadata">

**Author:** ![Bizcom](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bizcom/32/11669_2.png) [@Bizcom](https://discourse.devontechnologies.com/u/Bizcom)\
**Post date:** [February 15, 2021, 1:22pm UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/36 "2021-02-15T13:22:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Cassady](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cassady/32/8320_2.png) [@Cassady](https://discourse.devontechnologies.com/u/Cassady)\
**Post date:** [February 16, 2021, 6:17am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/37 "2021-02-16T06:17:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![benoit.pointet](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/benoit.pointet/32/9018_2.png) [@benoit.pointet](https://discourse.devontechnologies.com/u/benoit.pointet)\
**Post date:** [February 16, 2021, 7:10am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/38 "2021-02-16T07:10:35Z")

</div>

> [@Cassady](#):
>
> Since I didn’t have a `~Library/Script Libraries` folder, I went and created it, and placed the RegexAndStuff unzipped folder into it.

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

---

<div class="post-metadata">

**Author:** ![Cassady](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cassady/32/8320_2.png) [@Cassady](https://discourse.devontechnologies.com/u/Cassady)\
**Post date:** [February 16, 2021, 7:14am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/39 "2021-02-16T07:14:16Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Wolkenhauer](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/wolkenhauer/32/10482_2.png) [@Wolkenhauer](https://discourse.devontechnologies.com/u/Wolkenhauer)\
**Post date:** [February 18, 2021, 8:43am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/40 "2021-02-18T08:43:54Z")

</div>

One user of Obsidian had the idea to stream his collection of notes to [Neo4j](https://neo4j.com/), 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](https://publish.obsidian.md/semantic-obsidian/Using+the+Neo4j+Graph+View)

---

<div class="post-metadata">

**Author:** ![josieduffy](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/j/96bed5/32.png) [@josieduffy](https://discourse.devontechnologies.com/u/josieduffy)\
**Post date:** [March 4, 2021, 4:37am UTC](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782/41 "2021-03-04T04:37:32Z")

</div>

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!

 ![Screen Shot 2021-03-03 at 11.36.55 PM](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/1/6/16ae78a480a1c8deee61afd1ca6c14bd808566ce.jpeg)

[Previous page](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782.md?page=1)

[Next page](https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782.md?page=3)
