Publish from Tinderbox to DEVONthink

This video really helped, @pat. Thank you.

May I suggest to expand the “Publish to DEVONthink”-Stamp-Code a bit in order to place the backlink – from Devonthink to Tinderbox – into each exported note; so one can quickly return to original note in Tinderbox while working with the exported notes in Devonthink.

Code could look something like this:

action($Text("/Stamps/Publish to DEVONthink")); $URL=$NoteURL

Does this make sense? At least, it works here.

Cheers!

@PaulWalters did you try following the steps in the video? You’re running into a bug that I’ve already acknowledged. The video is just a couple minutes and shows the behavior when using top-level notes.

Try this:

  1. create two top-level notes
  2. create a text link between them
  3. publish

I’m happy to look into situations where it’s not working correctly, but first I’d like to establish a baseline. I’ve outlined simple steps above. If those exact steps don’t work for you, that’s very interesting to me.

Does that mean it worked for you, @andreas?

I like that idea… though I have some concerns about implementing it. The $URL already carries over to the DEVONthink url field. I don’t want to throw it away though if it’s there… one possibility is to move $URL to DT’s comment field – that’s what the annotate script does if a record already has a URL. I’ll think about this a bit.

Jepp, @pat, worked just as advertised :slight_smile: Thanks again

1 Like

Hi, @pat, this is impressive. Am I right in thinking that the notes will always go to DEVONthink’s global inbox and there’s no easy way to change that behaviour? (And maybe there wouldn’t really be any point in changing it?) I’m slightly wary about moving notes out of the global inbox and into different locations in different databases and still expecting links to work, but assume that once the between-document x-devonthink-item links are all fixed by reapplication of the stamp there shouldn’t be any problem—and, indeed, in my limited experimentation that has indeed been the case.

0.4.0

  • NEW Add $PublishToDEVONthink attribute for explicit publish selection
  • NEW Set DEVONthink’s URL field to Tinderbox note link (forum request)
  • FIX Linking to and from notes in containers
  • FIX Link issue when publishing from aliases
  • FIX Respect DEVONthink’s import destination configuration (forum report)

Done :slight_smile: I like it

That’s correct in v0.3.0. This 0.4.0 update (linked in the original post) now respects the configuration you have set in DEVONthink’s Preferences->Import->Destination.

That’s the really cool thing about x-devonthink-item:// URLs – you can move documents between databases and the links still work. Every document has an identifier that sticks with the document. Now if you duplicate the document, it gets a new identifier, and the link points to the old one. So don’t duplicate a document and delete the old one, or else the link will break.

You don’t even need to reapply the stamp to fix the links. As long as the linked-to document has a $SourceURL beginning with x-devonthink-item:// then it will be all good.

See for yourself:

  1. download the document from the original post
  2. create a top-level note (give it the p_DEVONitem prototype), add some text, and link it to “Publish to DEVONthink”
  3. publish “Publish to DEVONthink” first, and your new note second
  4. for each one, click the $SourceURL launch button to view the record in DEVONthink
  5. move them to separate databases
  6. view your note, click the link, and you’ll be on “Publish to DEVONthink”
  7. if you use DTTG then you can sync both databases and see the same behavior…
2 Likes

Most impressive. Thanks, @pat.

Minor thing. The 0.4.0 download has numerous excess windows with a view of the same note. You might want to close all windows in the uploaded version(s).

Thanks. OP is updated with 0.4.1, which shouldn’t have all those windows anymore.

1 Like

Nope, I just don’t really use tags, so I didn’t add that functionality. This is an early-stage tool used primarily by me (and I sort of thought only me :slight_smile: )

I can look into transferring the tags over.

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