Great Job Gunnar! Works for me.
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:
See here:
Tom
Great Job Gunnar! Works for me.
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:
See here:
Tom
Hi Gunnar,
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.
Yours perplexed but still hopeful,
Gavin
same for me
I don’t know if this casts any light on the mystery but this is what the link destination text I am getting looks like:
applewebdata://B14709FE-CAB7-4C8E-A6F5-B902D8721176/Content/Publish_to_DEVONthink/second_note.html
The last phrase: “Content/Publish_to_DEVONthink/second_note” is of course generated from the TB note hierarchy. The link label was “second note”
Are the curly quotes in the script likely to break this?
Great - yes - the curly little quotes - works perfect now - thanks a lot!
Here is my TBX-file
TBX-Devon.tbx (165.2 KB)
Ah yes, the curly quote issue ! If I only had been wearing my reading glasses I might have spotted that.
It works perfectly now for me too. Thanks to everyone who has helped out !
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.
One other thing to mention, I noticed the older code still uses $KeyAttributes. This has been replaced more recently by $DisplayedAttributes
Your code will need to be updated
I feel the demo-writer’s pain. Maintaining TBX for long term use (by others) is a game of constant review.
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?
Cheers,
Martin BB.
Here is a quick and dirty attempt.
TBX-Dev-md.tbx (173.9 KB)
I’ve only tried it with a couple of short notes, but it seems to work. Brilliant! Thank you very much. I hope others will find it useful, too.
Cheers,
Martin BB.
Hi Martin and Gunnar,
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
Tom
Tom, thanks for that. I’ll edit the code.
Cheers.
Updated the file.
TBX-Dev-md.tbx (173.9 KB)
I tried to insert notes in your file and run the stamp (publish all notes to DT). But nothing seems to happen. What am I doing wrong?
Hello Pat. great file, thank you.
I’ve spent today exploring this topic and process: composing in TBX and processing / storing in DT has been something I’ve sought for some time but only recently got my comfort level up enough to give it a try. And it worked wonderfully! Thanks to all the contributors here.
@pat 's approach got me pointed in the right direction but needed the update from @gul-iMac to pull it off. Like @Julien my mindset and workflow relies on integrating images with text. I found I needed to modify his / her recommendation for image placement by (after dragging from DT) inserting a “!” as prefix to the DT ItemLink below the image in TBX - e.g.,
!x-devonthink-item://E85F32FD-211E-4EE8-AA1B-9A7AA502D5E9
Applying the Publish to DT Stamp to an image-containing TBX Note resulted in a nicely md-formatted file in DT.
In my trials, my most frequent cause for error has been forgetting to first apply the p_DEVONitem Prototype to the Note before applying the Stamp.