Welcome, Guest. Please Login or Register
Tinderbox
  News:
Visit the Tinderbox Cookbook for tons of examples.
  HomeHelpSearchLoginRegister  
 
Pages: 1
Send Topic Print
application specific links to targets outside Tbx (Read 4849 times)
Christoph
Full Member
*
Offline



Posts: 52

application specific links to targets outside Tbx
Feb 14th, 2012, 5:22am
 
Similar to the discussion in another thread where a link to individual notes inside Tinderbox is requested that other applications can call, I am asking if application-specific links to individual items residing outside Tinderbox can be used. Several programs make URLs available which act as links and - if clicked - open the specific linked item in whatever application is specified. Examples are
x-devonthink-etc
nvalt://etc
and the like.

Edit: I just made a fool of myself, I was too focused on these connections being "links" when instead they work fine as URLs. So my question should be more general "What is the most convenient way to add these links to a note?"
As it stands, the links cannot be inserted in the text as such but detached from it in a key attributes field, is that right?
Sorry
Christoph
Back to top
 
 
  IP Logged
David Bertenshaw
Full Member
*
Offline



Posts: 153

Re: application specific links to targets outside Tbx
Reply #1 - Feb 14th, 2012, 5:58am
 
If I've understood you correctly, you can do this already.

E.g. in DevonThink, cmd-opt-ctl-C to capture the document link.

In Tinderbox, cmd-v, then highlight the pasted link, and shift-cmd-L will bring up the Web Link dialogue box to make it into a clickable link which will take you back to DTP and the correct document.

I use this feature a lot and it works very well -- it also works with Bookends links.  

You can also create a specific attribute (DTP-Link in my case) to contain the links if you want a bit more structure.

Cmd-2 to bring up the attributes box, then Create and choose the type as url.  Add this as a key attribute to your prototypes and you can simply copy the DTP link into the attribute -- you can then click on the little globe to follow the link.

Sorry if I've misunderstood -- but I get carried away when I think I know the answer as it happens so rarely Wink...
Back to top
 
 
  IP Logged
Christoph
Full Member
*
Offline



Posts: 52

Re: application specific links to targets outside Tbx
Reply #2 - Feb 14th, 2012, 6:33am
 
David

you understood me perfectly well and I must admit I haven't thought of using in-text links. In following your description I now remember why I have never adopted their use, because I find them a little fiddly and unstable.
I can paste the link inside the note's text and then highlight and make it a link whereupon it turns blue. However, no matter how often I click on it it will never take me anywhere.
The link is intact though as opening the "browse links..." drop-down menu will show it and double clicking in there will eventually take me to the target. That is a couple of clicks too many to make it a viable solution for me, though.
Also, saving the file makes the blue color and thus  the only visual indication of there being a link disappear.

I always thought they might not work but apparently you don't have the same difficulty. Does anyone have suggestions how to solve the problem?

Many thanks for your very helpful answer!
Back to top
 
 
  IP Logged
David Bertenshaw
Full Member
*
Offline



Posts: 153

Re: application specific links to targets outside Tbx
Reply #3 - Feb 14th, 2012, 6:46am
 
Christoph,

You have to press cmd-opt before the links in a note become visible and active (but you've got to keep cmd-opt pressed while you click).

Another wrinkle. Sometimes TBX can get a bit finicky about the extent of the link, so that the clickable area just expands....

To get round that, you can go to the end of the link and press opt-space -- this will resume 'ordinary' text.

HTH

David
Back to top
 
 
  IP Logged
Christoph
Full Member
*
Offline



Posts: 52

Re: application specific links to targets outside Tbx
Reply #4 - Feb 14th, 2012, 9:43am
 
Now this is getting interesting. Technically everything works as you describe it, many thanks for refreshing my memory.
What remains is more a philosophy of usage problem. These URLs/links are called links and turn up in the "browse links.." drop down, yet they don't turn up in the roadmap of links, which is where I'd expect them appear in an ideal world.

Can they be made to do that easily?


Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 4680
Southsea, UK
Re: application specific links to targets outside Tbx
Reply #5 - Feb 14th, 2012, 10:17am
 
The technique above works very well for most file types - even those without special app-specific URLs . Instead of (or as well as) storing paths to local files in File-type attributes, you can link to them using a file:// URL instead of http:// URL.

For the less tech readers, here's an example, where I'll link to the "About Stacks.pdf" file in my Documents folder. First I need the full POSIX path of the file (how? or see ** below), which gives me:

'/Users/mwra/Documents/About Stacks.pdf'

Note that we need the full path; don't use one with a' ~' start as it won't work. Now, I copy that file path to the clipboard. Then in your TBX's $Text, I select the desired anchor text and press Shift+Cmd+L to make a new web link. In the dialog's 'URL' box, change the default 'http://' to 'file://' and then paste in the path at the end of the existing text, thus:

http:// -> file://   then paste the clipboard contents after the last '/'. Like this:

file:// + /Users/mwra/Documents/About Stacks.pdf

giving:

file:///Users/mwra/Documents/About Stacks.pdf

Yes, there should be three forward slashes. Click OK to close the dialog. Now use the Cmd+Opt+Click method to open the file as @David describes above.

Using v5.10.1 I've just opened a series of local files: XML into BBEdit, PDF into Preview, TBX into Tinderbox, etc. Exactly which app OS X will chose with which to open the app may vary from Mac to Mac depending on what apps you've got installed.

Of course for apps with their own special URL forms, like DEVONThink, just use those instead of file://.

Bear in mind you're saving a literal OS path and not an OS alias, so if you subsequently move the file the link won't work.  Not tested, but if think the file might need to move, you could probably make an OS alias for your file and link to that; leave the alias in situ and move the target file as required.

I know this looks like lots of work but it's much simpler than it appears and very easy after you're done it the once around.

** Another simple trick to find a file's OS path is to display $File as a key attribute. Then drop a file (or an alias to it) from Finder onto the File button in the sidebar. You can now cut the $File value to the clipboard leaving $File empty for further use.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v5
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print