Skip to content

benoitpointet/devonthink-graph-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devonthink-graph-view

This script generates a graph visualization of a set of Devonthink (DT) records & groups.

Origins

It takes its origin in a forum discussion about the value of graph visualization for Devonthink.

Content

The scripts contains different files:

  • DTGraphView.applescript : the script that parses the items set and generates graph data.
  • part1.html & part2.html : the web page (split in two parts) in which the data is injected.
  • /sigma/ the sigma.js library used to draw the interactive graph (not loaded actively though), just here for customization means.

Installation

  • Git-clone it, or download it as a zip archive. You may place it in ~/Library/Application Scripts/com.devon-technologies.think3/Menu/.

  • This script requires RegexAndStuffLib (min v1.0.6) and Dialog Toolkit Plus (min v1.1.2) from Late Night Software. You should place both .scptd files in ~/Library/Script Libraries/.

Usage

  1. Select items (either from a search or within the hierarchy) then launch the applescript. If you launch without selecting, the script will take all search results if in search mode, else the direct children of the current group.
  2. A progress bar appears showing you progress info.
  3. The script generates a graph of the nodes:
    • Every items is represented as a node of the graph, groups are blue.
    • Several relationships are represented as edges:
      • "A contains B" relationships (like in "group A contains record/group B"), in light-cyan.
      • "x-devonthink-item" links in the record URL (often used to point to the source of a record), in light-green.
      • Wiki links in Markdown files, in pink.
      • "x-devonthink-item" links in the record content (often used as an alternative to Wiki-links) in purple.
  4. The script then embeds the graph data into a HTML doc which by default saves in the global Inbox and open in a separate window.
  5. At first the graph might looks messy and frozen for a few (milli-)seconds: the force-directed layout algorithm has kicked in. Then the graph moves and stabilizes. The speed of this depends on graph complexity (see performance below).
  6. You may interact with the graph in the following ways:
    • Once the graph layout is good enough for you, you may click on the "freeze" link to stop the algorithm and thus freeze the display.
    • You may zoom in/out and pan in the graph, like on an interactive map.
    • Double-click on a node to open the item in DT.

Performance

  • It performs well under ~200 items. Over that, it gets sluggish (depends on your machine, of course).

Feedbacks & discussion

For questions, remarks and help please ask on this thread https://discourse.devontechnologies.com/t/graph-view-a-network-visualization-script-for-dt/58782.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published