Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom URL scheme for opening a note #97

Closed
ylian opened this issue Apr 10, 2015 · 23 comments
Closed

Custom URL scheme for opening a note #97

ylian opened this issue Apr 10, 2015 · 23 comments

Comments

@ylian
Copy link
Member

ylian commented Apr 10, 2015

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
Copy link
Member Author

ylian commented Apr 19, 2015

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

@crispinb
Copy link

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
Copy link
Member Author

ylian commented Nov 20, 2015

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.

@crispinb
Copy link

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

@crispinb
Copy link

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
Copy link
Member Author

ylian commented Nov 20, 2015

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.

@crispinb
Copy link

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
Copy link
Member Author

ylian commented Nov 20, 2015

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

@crispinb
Copy link

Great, cheers.

@mbelletti
Copy link

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
Copy link
Member Author

ylian commented Jan 6, 2016

@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

@mbelletti
Copy link

Very fast reaction! :-)

Thank you

@ylian
Copy link
Member Author

ylian commented Jan 6, 2016

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

@mbelletti
Copy link

@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
Copy link
Member Author

ylian commented Jan 7, 2016

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

@mbelletti
Copy link

#361 fix the problem to me.
Thank you!

@livfwd
Copy link

livfwd commented Jan 24, 2016

@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
Copy link
Member Author

ylian commented Jan 24, 2016

@livfwds Great idea! Will do.

@livfwd
Copy link

livfwd commented Jan 24, 2016

Thanks so much!

@ylian
Copy link
Member Author

ylian commented Feb 9, 2016

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.

@ylian ylian closed this as completed Feb 9, 2016
@ylian ylian changed the title Custom URL Scheme Custom URL scheme for opening a note Feb 9, 2016
@livfwd
Copy link

livfwd commented Feb 9, 2016

Awesome!

@dbirch-cb
Copy link

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
Copy link
Member Author

ylian commented Apr 11, 2019

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants