HappenApps/Quiver

Custom URL scheme for opening a note

ylian opened this issue · 23 comments

ylian commented

A custom URL scheme can provide a way for another app, even a webpage, to open a Quiver note from a link. This applies to both OS X and iOS.

quiver://[host]/[action]?[query]

Also on both platforms, a custom URL scheme makes web clipping possible. A web clipper (a helper app) can be implemented on both iOS and OS X, and when clipping a page, will call the custom URL scheme to create a note.

Also, on iOS, using a custom URL scheme has been the standard way of implementing inter-app communication. iOS 8 introduces app extensions, which Quiver will implement, but the custom URL scheme is still useful.

ylian commented

Implemented in 2.2b26. Currently it only supports one URL quiver://notes/{noteID}, but this sets the stage for other things like web clipping and workflow integration with Alfred.

https://dl.dropboxusercontent.com/u/3445731/Quiver%202.2b26.zip

Any plans to make this link format available in Quiver for pasting into other apps? Perhaps as an alt version of 'copy note link'?

ylian commented

Yep that's the plan all along. This feature was taken out in the last minute because it's inter-connected with a few other things, and I didn't want to introduce a public scheme prematurely.

OK thanks. And congrats on a top-notch 3.0 release.

Oh one more thing. Can we rely on the quiver://notes/{noteID} form being stable? I'm thinking in terms of manually formatting links where needed for now.

ylian commented

There is one small thing that I'm not sure. Should it be quiver:///notes/{noteId} or quiver://notes/{noteId}? The former is more standard compliant (URL spec), but the latter seems more natural for me.

I'd be inclined to stay with the standard. I'm no expert, but urls without hostnames always have 3 backslashes, and who knows what tools someone might want to use that might depend on standard url parsers etc?

ylian commented

Yep, that makes sense. So that's decided - quiver:///notes/{noteId}.

Great, cheers.

Is that correct?

open "quiver:///notes/65822832-0CBE-4D4C-83BE-EBEAD6FC3FD9"

it opens Quiver but dosen't shows the note.

65822832-0CBE-4D4C-83BE-EBEAD6FC3FD9 is a valid {noteId}

ylian commented

@mbelletti It's not yet in the release build. You can try the build here: https://dl.dropboxusercontent.com/u/3445731/Quiver%203.0.1b1.zip

Very fast reaction! :-)

Thank you

ylian commented

@mbelletti I will push out 3.0.1 in a couple of days. This will be in.

@ylian It seems that also 3.0.1 doesn't work as expected.

open "quiver:///notes/65822832-0CBE-4D4C-83BE-EBEAD6FC3FD9"

open Quiver but not the note.

ylian commented

@mbelletti It seems to open work if Quiver is already open. Will fix.

#361 fix the problem to me.
Thank you!

@ylian after you right-click or control-click on note in the note-list, would it be possible to either add this new solution as a "copy external note link" option in the cmenu that pops-up, or to do something similar to what evernote has done and after the right-click/control-click menu pops-up, then you could hit the option key to change "copy note link" (which works in-app) to "copy external note link) for this new, quiver:///notes/{noteId}, solution you've created? Awesome app!

ylian commented

@livfwds Great idea! Will do.

Thanks so much!

ylian commented

The URL scheme is implemented in 3.0.1.

@livfwds In 3.0.1, if you "copy note link", it should just work. When you paste into an external app, it will be an external note link (quiver:///notes/{noteId}). When you paste into a text cell, it will be an internal note link (quiver-note-url/{noteId}). When pasted into a Markdown cell, it will be a Markdown link ([note](quiver-note-url/{noteId}).

I will open a new ticket for other URL schemes.

Awesome!

Question - is there a way to use this schema to open quiver to start writing a new quiver note from the command line? Something like:
open quiver:///notes/

I tried that but that doesn't see an option.

ylian commented

@dbirch-cb There is a custom URL used by the Quiver Web Clipper:

quiver://actions/create-note?type={type}&title={title}&content={content}

Create a new note.

Parameters:

  • type (optional): The type of the note ("text", "markdown"). Defaults to "text".
  • title (optional): The title of the note. Defaults to an empty string.
  • content (optional): The content of the note. If not specified, the content of the clipboard will be used.

Example:

  • quiver://actions/create-note?title=New%20Note&type=markdown