Here is an update that is supposed to fix the linking problem in DEVONthink.
Locate the “Publish single note to DEVONthink” note (in “–UTIL–”). Replace from “var linkNotes;…};” up to, but not including $DTExportSource, with this code;
var linkNotes;
linkNotes = find($SourceURL.beginsWith(“x-devonthink-item”) & !$IsAlias);
$DTExportSource = ;
linkNotes.each(l) {
var dtLink($SourceURL(l));
var lp(exportedString(l, “^path^”));
if(theExport.contains(lp)) {
theExport = theExport.replace(lp, dtLink);
};
};
In addition, for those interested in a more tidy Stamp menu, I tucked these commands under a submenu called DEVON by naming the stamp with a prefix DEVON:
Again, thanks so much for looking into this. I have tried to do as you suggest and have pasted the text into the script. But sadly, it doesn’t work for me. The links in DT are still not converted to DT-pattern links.
If you are getting it to work, I can’t imagine what we are doing differently.
This thread has shown up an unfortunate and unintended naming collision—looking at TBX v0.5.4.
In note “Publish single note to DEVONthink”, the code below declares a variable ‘linkPath’:
var linkPath(exportedString(l, "^path^"));
In 2018 that wasn’t problematic. But in v9.0.0, a new action operator linkPath(). I’m not sure how such a name collision is handled. But, even if the doc works, I’d suggest updating the TBX to use a variable with a non-clashing name. I avoid this by prefixing all my variable names with a ‘v’ which makes variable names immediately obvious. Of course, other naming methods are equally helpful - mine’s just one such.
I see that there was some discussion a while ago about getting this to work with Markdown (i.e. inserting a Markdown file into DEVONthink instead of an HTML file). Is this still possible with the latest version of Tinderbox? And/or is it possible to do the same with an RTF file?
Gunnar, thanks for updating the script (untested) to “markdown” from html. My preference too.
Quickly and as an addition,
I noticed in the quick and dirty attempt file, the old attribute $KeyAttributes is no longer used, it should be changed to the current name of $DisplayedAttributes in the 3 references noted below to