-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
This comment has been hidden.
This comment has been hidden.
-
Based on additional details posted in another thread, I believe the problem is that an application called DEVONthink misapplies the URI format in its own links as follows:
I think this 5-year-old thread about DEVONthink links in Anki means that Anki is parsing URIs correctly, and DEVONthink needs to use zero, one, or three slashes, but not two for its links. If it is going to continue using URIs as they currently are, where the item URL is constructed as if the item UUID is a hostname, the item UUID should be treated as case-insensitive when the user clicks an item link. Further detail of my investigation in the collapsible section below. Extra analysisLike YOURLS' normalization function written in PHP, the Python standard-library URI parser >>> from urllib.parse import urlparse
>>> res = urlparse('x-devonthink-item://930FBCF1-CB42-45B8-9092-904030947FBF')
>>> res
ParseResult(scheme='x-devonthink-item', netloc='930FBCF1-CB42-45B8-9092-904030947FBF', path='', params='', query='', fragment='') As I suggested above, using any of the possible slash counts other than the two that DEVONthink currently uses will work: >>> noslash = urlparse('x-devonthink-item:930FBCF1-CB42-45B8-9092-904030947FBF')
>>> noslash
ParseResult(scheme='x-devonthink-item', netloc='', path='930FBCF1-CB42-45B8-9092-904030947FBF', params='', query='', fragment='')
>>> oneslash = urlparse('x-devonthink-item:/930FBCF1-CB42-45B8-9092-904030947FBF')
>>> oneslash
ParseResult(scheme='x-devonthink-item', netloc='', path='/930FBCF1-CB42-45B8-9092-904030947FBF', params='', query='', fragment='')
>>> threeslash = urlparse('x-devonthink-item:///930FBCF1-CB42-45B8-9092-904030947FBF')
>>> threeslash
ParseResult(scheme='x-devonthink-item', netloc='', path='/930FBCF1-CB42-45B8-9092-904030947FBF', params='', query='', fragment='') Zero slashes is the best choice if they do not want to handle the leading |
Beta Was this translation helpful? Give feedback.
Based on additional details posted in another thread, I believe the problem is that an application called DEVONthink misapplies the URI format in its own links as follows:
//
immediately after thescheme:
is reserved for an optional "authority" component—commonly, a hostname. In the next URI component, the "path",//
can appear if a path segment is empty—but the first path segment may not be empty if no author…