Open jlorince opened 5 years ago
There is a URL action for that already, currently used in Quiver Web Clipper.
Quiver registers the quiver:// URL scheme which provides a few useful actions.
The format looks like this:
quiver://actions/[action]?param1=value1¶m2=value2&...
All values should be URL encoded.
Create a new note.
Parameters:
Example:
quiver://actions/create-note?title=New%20Note&type=markdown
Awesome thank you! Is there a way to specify which notebook it goes in?
No, not at the moment.
Ok, so it look like it goes in the inbox by default. That will work for me for now (though adding support for choosing the notebook via URL params in the future would be great!). Thanks again!
One last question @ylian. Is there a way to specify the ID of the note when creating it or otherwise programatically retrieve it? I can have have a script create a note but I don't know how I can then get a link to the note I created from the same script. Possible?
(also is the full URL scheme documented anywhere?)
Hmm, you can't get the ID back since the URL scheme is one-way. Maybe I should allow sending in the note ID as an optional parameter.
The URL scheme is not yet documented since only the minimum has been implemented for the web clipper.
Yeah that would be awesome. I imagine it would work best if create-note would create a new note with the specified UUID if it didn't already exist. If you called it again with the same UUID it would open that note. That way a shell script would be able to create and reference a note (without needing to create a two-way scheme that required a note-exists method or similar). +1 for sure
Being able to open notes from the command line using
open "quiver:///notes/...."
is great, but for scripting purposes it would be great if there was a similar mechanism to create a new note via the URL scheme as well. Is this possible/planned?My specific use case is to programmatically create a new note to associate with a taskwarrior task from the CLI, but I can imagine lots of use cases for this.