Graph view : a network visualization script for DT

I do not see bugs

Just a small number of items - a dozen or less

I now cleanup potential faulty params, key escapings that would get wiped at compile time and weird chars. Hope it works better now. Re-download.
If it still does not work, I won’t be able to help you without having identify the culprit:

  • try with a single item selected
  • try putting some display alert ("all good til here") to identify the faulty line in the block that starts at line 90.

When I select just one or two the script completes with no error - nor with any graph output.

I face such an error from time to time, it looks like a race condition, like JS injected before page fully ready. Generally when I rerun the script, this disappears. I couldn’t dedicate enough time to fix that bug yet, it would probably mean generating the graph differently: embedding all the data and logic in one html which then gets opened.

1 Like

@benoit.pointet thank you for what looks like an important contribution.

I had to install the RegexAndStuffLib script library from this source; probably worth clarifying in the script documentation.

With the aforementioned script installed, I’m reproducing @rkaplan’s error: no errors, no graph output.

Rerunning the script, as you suggest, does not address the issue.

@macula @rkaplan

I just fixed (again) a bug that prevented it from running smoothly when launched from DT script menu item. Re-download.

Were it still not to display the graph (even after a re-run), please help me debug at-a-distance by uncommenting the following line and sending me in a PM the whole text that pops up in the alert box:
-- display alert (theJSONData)

thanks for your help.
b.

PM sent

Many thanks for all your efforts

@benoit.pointet sending PM. Thank you.

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