Publish from Tinderbox to DEVONthink


(Andreas Grimm) #21

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!


(Pat Maddox) #22

@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.


(Andreas Grimm) #23

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


(Rick) #24

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.


(Pat Maddox) #25

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…

(Rick) #26

Most impressive. Thanks, @pat.


(Paul Walters) #27

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).


(Pat Maddox) #28

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


(Pat Maddox) #29

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.


(jmm) #30

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)^"


(jmm) #31

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.


(Desalegn) #32

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


(Pat Maddox) #33

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.


(Christoph) #34

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…)


(Pat Maddox) #35

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.