If it is no different than a web address, then there is still hope.
What I mean is that DEVONthink has a URL scheme such that any URL identified with
x-devonthink is opened and processed by DEVONthink. Currently if I click a URL like
x-devonthink-item then DEVONthink finds a item identified with the provided record id, and opens it in DEVONthink. If I add a query parameter of
?reveal=1 then the default open behavior is changed. The query parameter causes DEVONthink to reveal the item in the item list instead of opening it in a new window. In both cases the same item is found, by its record id, but the action taken by DEVONthink was different.
If I provide a URL like
x-devonthink://<command>? <parameter=value¶meter=value&...> then DEVONthink takes an action quite different than what I would expect for a simple pointer to a file. One example would be
x-devonthink://search?query=DEVONthink where a search is performed with the provided search query criteria.
This tells me that DEVONthink intercepts the URL requests and processes them according to its full URL content. The key for me is that the result from the URL is not fixed like with a
file:// URL. It should be possible then to do something like a 302 redirect to the content if a special query key is sent.
Maybe something like?:
x-devonthink-item://<recordID> —> Open the item with the given record id in a new window.
x-devonthink-item://<recordID>?reveal=1 —> Reveal the item identified with the record id, in the item list.
x-devonthink-item://<redordID>?stream=1 —> Stream back the actual content of the URL much like how an image or an HTML file is returned for an HTTP request.
302 redirect, not because I think that DEVONthink would actually perform a
302 redirect, but rather that DEVONthink could alter its behavior, much like how a
302 alters behavior. The good thing is that DEVONthink already does this with
My question is how can DEVONthink be made to alter its behavior based on a key to permit
x-devonthink-item URLs to be used inside
Markdown documents so they can be processed by external markdown readers like
marked 2. The
devonthink-item URLs already work in Markdown documents that are rendered inside DEVONthink but not outside.
Inside a Markdown document rendered in DEVONthink looks like:
The same outside DEVONthink, in
marked 2 looks like: