Publish from Tinderbox to DEVONthink

As far as I have tested, a simple modification to the Applescripts does the trick. In case it is of interest to other users, I post them here:

In Create DEVONthink record, I have added: tags:"^value($Tags)^",
In Update DEVONthink record, I have added: set tags of theRecord to "^value($Tags)^"

2 Likes

As long as you keep it opened here or in Github, your script is THE solution for the integration of DEVONthink and Tinderbox as far as I am concerned.

Unless they are real footnotes, I keep my sources solely in DT, referenced as web links in the $Text of my annotations. Therefore, the watched folders feature has ended up being less important in my seutp.

I use Tinderbox mostly for my own writing. With your script I can have it in DT as well. I am still to decide if in the same DT database as sources or in a different one.

So, thank you very much for sharing your script.

3 Likes

THANK so much for this script dear @pat. This has been very helpful.

1 Like

I’m glad it’s helpful :slight_smile:

fwiw, I’ve moved to a pattern of one DT export per TBX. The linking mechanism I figured out here is clever, but slow.

1 Like

Thanks a lot for the script, Pat!

Just to make sure that I don’t get this wrong: This script provides a way to publish a a personal wiki that lives inside Tinderbox. More precisely, Tinderbox is where the magic happens and the representation in Devonthink is meant to be a read-only version for convenience, correct?

Even though we have folder watching (Devonthink -> Tinderbox) and the script you are presenting here (Tinderbox -> Devonthink) the scenario you described is the above, not a true two-way synchronisation in which notes could be edited and added in either program?
(That would be so nice…)

Exactly. It’s if you want to write your notes in Tinderbox, and use DEVONthink to take them with you.

Correct.

Yep it would. It’s important to note that the stuff I provide here is unofficial, just me creating stuff using the tools at hand. It’s entirely possible that changes to Tinderbox or DEVONthink could break functionality.

This is perfect for my needs, @pat, and works as you said it would. Thank you! :pray:

Q: Is there a way to edit the script or stamp so that the link goes to the map view instead of the outline view?

1 Like

Possibly, I gave up on making sense of how tinderbox:// links works a long time ago…

Continuing the discussion from Tinderbox as a QDA app (alternative to or along with Atlas.Ti or Maxqda):

I haven’t abandoned it by any means. If you’re referring to my most recent reply before this one, it’s simply that the tinderbox:// URLs that you get from Note->Copy Note URL have brought me more headaches than benefit over the years. So I don’t use them.

Publishing Tinderbox documents to DEVONthink is still super useful for me. That’s why I took the time to create this tool :slight_smile:

3 Likes

The amount of effort you’ve put into this gift to the community sure looks like active engagement to me. Thanks for everything :clap::clap::clap:

A more robust URL scheme would be useful, but perhaps not feasible. Something along the lines of DEVONthink’s UUID-based URL.

I have never had a DEVONthink URL (“item link”) fail – apart from the times that I intentionally hacked databases to see what I could break. The DEVONthink URL will open the application, and even open a closed database, and the trash receptacle within that database, to locate the document with that UUID. Of course this requires some industrial-strength behind-the-scenes magic dust to make the DEVONthink method work.

1 Like

Yep, this is exactly why I’m so obsessive about figuring out ways to import things into DEVONthink. I can copy a DT URL and paste it into a Calendar event, OmniFocus task, or anywhere else and it will work (including on my iPhone if I’ve synced the database to my phone).

It is one of my favorite features of any software ever.

2 Likes

Oh, my bad. I have misread your comments. Glad to know that you still use it, and support it. It has been very useful to me.

Dear @pat,

First of all: thank you so very much for your Publish to DEVONthink workflow! I find it very useful and use it all the time.

I do have a question about it, though. In some of my TB notes, I have links to Bookends references. Those are turned into regular text into DTPO; is that the desired behavior or have I done something wrong? If the former, would you suggest that I “re-link” those references to BE in DTPO? If the latter, could you please point me in the right direction to correct my mistake? Thank you for your consideration.

Best regards,
Enrico

It’s not desired behavior, but you probably haven’t done something wrong :slight_smile:

Would you be willing to send me a stripped-down version of your TBX? Just leave the one note in that has the bookends link that isn’t working (along with basic infrastructure – e.g. stamps, templates, applescripts). Then I can take a look and see what’s going on.

You can, just be aware that the next time you “publish to DEVONthink” the content will be overwritten. So, you could lock the record in DEVONthink, or duplicate it and make your edits in the duplicated version. At least that way you have something working until we get to the bottom of what’s going on here.

Dear @pat,

Thank you for your kind reply, the helpful clarifications, and the generous offer to look into that.

I have attached here a simplified file with all the infrastructure but only four notes that are linked to one another, and three of which contain links to Bookends references (in blue); hope that is helpful. In any case, please feel free to let me know if there is anything else you need.

Thank you for your consideration.

Best regards,
Enrico

Work - Content - Simplified.tbx (114.3 KB)

Possible fix: instead of copying a bookends link and pasting it directly into Tinderbox note text, you should:

  1. Select the Tinderbox text you want to link
  2. Run Note -> Make Web Link...
  3. Paste the bookends URL into the URL field and press Create Link

I suspect that will do the trick for you.

What follows is my stream-of-consciousness exploration of why your existing links don’t work.


Okay so I took a look at the document you sent (thanks!) and there’s something interesting about it. On my machine, at least, the links don’t render as part of the HTML. If you view the text preview or HTML, you’ll see that the linked text gets converted to plain text.

Another hint is that if you right-click the note and “browse links,” the linked text doesn’t show up in the browse links pane. Typically external links like that will show up as a (web link):

BUT

I do have a hypothesis: maybe Tinderbox doesn’t treat pasted rich text links the same as text links created in Tinderbox. To test this, I selected a DT record and ran “copy item link” to get a rich text link, which I pasted into my Tinderbox note. I got the same result as your doc – it appeared to be a link in the text (and it worked when I clicked on it!) but Tinderbox rendered the link as plain text in its HTML export.

1 Like

Dear @pat,

Thank you very much for your prompt and helpful reply.

You are right: in Tinderbox, the Bookends links in my notes are converted to plain text when viewed in Preview or HTML.

And indeed the procedure you described to create a rich-text link from a DEVONthink record (i.e. “copy item link” and paste it in a Tinderbox note) is exactly what I did to create my links to Bookends references in Tinderbox.

I have tried what you suggested:

And it works: the link appears as link in Preview and HTML, and when “Published to DEVONthink”, it remains a link; however, in both Tinderbox and DEVONthink, the link takes me to the PubMed record in Safari and not to the reference in Bookends. But perhaps I misunderstood what you suggested I do?

Again, thank you very much for your help.

Best regards,
Enrico

hrm I don’t know… when you look in HTML preview, what is the link? Assuming it’s something like bookends://sonnysoftware.com/19087 I would expect it to open in Bookends.

If you want to link your Devonthink files with their Bookends entries: now, we have a great user script by Zach: Autolinking Bookends and DEVONthink records - Sonny Software

Pat linked Tinderbox (=notes in html format) with Devonthink
Zach linked Bookends (pdf, epub files) with Devonthink

Devonthink is our hub (center)—works great on the mac as well as the ipad. This is looking great.

Thank you, @pat, for getting back to me on that. Yes, in the HTML pane the link looks something like:

<p><a href=“bookends://sonnysoftware.com/982”>The dynamics of plant plasma membrane proteins: PINs and beyond</a></p>

And now the link appears as such in the Preview pane too and is preserved in DTPO. But unfortunately, I am now experiencing a different problem: every time I click on the link in the Tinderbox note, I get a message such as:

“There is no application set to open the URL bookends://sonnysoftware.com/982.”

The window in which the message appears allows me to choose an application to open the link, but Bookends is not among the recommended applications to do so; however, if I go through a few steps, I am able to enable Bookends to open the link. Unfortunately, the procedure needs to be repeated every time I click on a link: the system never seems to remember that it should open it with Bookends, even if I had given full access to Bookends in System Preferences > Security & Privacy when I had installed it.

Anyway, I suspect the problem is Bookends, so I requested help through their forum and technical support; I’ll keep you posted.

And thank you, @Desalegn, for reminding me of that great resource: I had come across that post as I was exploring the Bookends forum, but I had completely forgotten about it, so thank you for bringing it back to my attention. I hope to resolve my problem with hypertext links in Bookends soon, so that I can test that script too!

Best regards,
Enrico

1 Like