I spent the weekend evaluating Tinderbox to see if it would fit my research workflow, which is currently heavily dependent on DEVONthink — I have some hundreds of Markdown notes stored in it. When I discovered the AutoFetch feature, I realized I could use it as an extraordinary tool for analysis without breaking my current infrastructure, particularly with the Map View.
But then, it would be a requirement to reproduce and maintain the mesh of links already in existence between my notes. My understanding is that there isn’t such a feature built into Tinderbox to detect those references and create the links between TBX notes. Studying the documentation, I was able (after a few long hours!) to produce this piece of code, which I am currently using as a Stamp for testing:
if($Text.contains("x-devonthink-item://")){ $MySet =; $MyList=runCommand($Text("extract-dtp-links"), $Text); $MyList.each(x) { $MySet = $MySet + find($URL.contains("x-devonthink-item://" + x)); } ; linkTo($MySet); $Color="red" }
It is coupled with the shell command stored in “extract-dtp-links”:
sed -n 's|^.*x-devonthink-item://\([A-Z0-9-]\{36\}\).*$|\1|p' | tr '\n' ';' | sed 's/;$//'
Et voilà! I was able to see some of my notes beautifully linked (I still can only see some of them with my unregistered copy of TBX while I wait for my order to processed…).
My question then is the following: isn’t calling a shell command a performance killer in the long term? I’d certainly like to automate the process with an Agent or Edict, but I don’t know how it is going to behave with hundreds or maybe thousands of 200-word notes. Is there a built-in procedure for scanning $Text, different from the .contains() method, returning e. g. a List or a Set of occurrences that could be internally evaluated using regular expressions?