11. Integration ↑
11.1 Custom URL Scheme
Notenik has its own custom URL scheme, which can be invoked by other apps as a means of integrating Notenik with these other applications.
Note that URLs must in general be percent encoded. The most common encoding is done by replacing each space with %20
.
The following commands are supported.
Open
This command opens a Collection and, optionally, a specific Note within that Collection and. optionally, at attachment for that Note.
Following is a sample URL:
notenik://open?shortcut=todo&id=pickupmilk
Let’s break this down:
notenik://
- The custom scheme that will invoke the Notenik app.open
- The Notenik command to open a Collection and optionally a specific Note within the Collection.?
- A question mark indicates the end of the command and the beginning of the query string.shortcut=todo
- The shortcut identifying the Collection to be opened. Note that shortcuts are defined in such a way that they will generally not need to be percent encoded.path=Users/user1/Sites/site1
- Specifying the complete path would be an alternate way of identifying the Collection to be opened. Path values generally will require percent encoding.&
- An ampersand is used to separate eachlabel=value
parameter from the next.id=pickupmilk
- The ID identifying the Note to be selected for Display. Note than a Note ID is defined in such a way (removing spaces, etc.) that it will not need to be percent encoded.
The open
command accepts the following parameters following the question mark:
shortcut
- The shortcut for the Collection to be opened.path
- The complete path to the Collection to be opened, with percent encoding.id
- The ID identifying the Note to be selected for display, which is generally the Note’s title, with spaces and punctuation removed, and converted to lowercase.timestamp
- A timestamp for a Note can be supplied, as an alternate toid
, as a means of identifying a specific Note to be selected for display.notepath
- A complete file system path to a specific Note can be specified, as a means of specifying both a Collection and a Note within the Collection; again, the path will need to be percent encoded.attachment
- The name of an attachment can be specified, in which case the attachment will be opened. The name should only consist of the portion of the filename following the title of the Note ad the pipe separator, and should not include the file extension.select
- Specify a value ofrandom
to select a random Note within the Collection. This is an alternative to specifying a specific Note to be opened via one of the other parameters.mode
- Specify a value ofquotes
to change the Display mode to Quotations Mode, and to hide the left-hand List of Notes, producing a compact display focused on one quotation at a time.
An easy way to obtain a complete URL that can be used to later open a specific Note is to right-click the Note’s row on the List tab within Notenik, and then select Copy Notenik URL
from the contextual menu that will pop up. This will copy a complete Notenik URL to the clipboard, from which it can then be pasted into another location.
To obtain a URL to open the Collection only, without specifying a specific Note, select Copy Notenik URL for Collection
from beneath the Collection
menu, then paste into the desired location.
Add
Following is a sample URL:
notenik://add?shortcut=todo&title=Pick%20up%20milk&body=You%20gotta
Again, let’s break this down.
notenik://
- The custom scheme that will invoke the Notenik app.add
- The Notenik command to add a new Note to an existing Collection.?
- A question mark indicates the end of the command and the beginning of the query string.shortcut=todo
- The shortcut identifying the Collection to which the new Note is to be added.path=Users/user1/Sites/site1
- Again, specifying the complete path would be an alternate way of identifying the Collection to be used.&
- An ampersand is used to separate eachlabel=value
parameter from the next.title=Pick%20up%20milk
- The title for the new Note. This will amost always require percent encoding, as in this example.&
- An ampersand is used to separate eachlabel=value
parameter from the next.body=You%20gotta
- The body of the new Note. Again, this will almost always require percent encoding.
Other fields may also be specified for a new Note, using a similar label=value convention.
Expand
This command expands the specified tag on the Tags tab of the Collection window.
Following is a sample URL:
notenik://expand?shortcut=todo&tag=shopping
Let’s break this down:
notenik://
- The custom scheme that will invoke the Notenik app.expand
- The Notenik command to expand a tag.?
- A question mark indicates the end of the command and the beginning of the query string.shortcut=todo
- The shortcut identifying the Collection to be opened. Note that shortcuts are defined in such a way that they will generally not need to be percent encoded.path=Users/user1/Sites/site1
- Specifying the complete path would be an alternate way of identifying the Collection to be opened. Path values generally will require percent encoding.&
- An ampersand is used to separate eachlabel=value
parameter from the next.tag=shopping
- The tag to be expanded.
The expand
command accepts the following parameters following the question mark:
shortcut
- The shortcut for the Collection to be opened.path
- The complete path to the Collection to be opened, with percent encoding.tag
- The tag to be expanded.
Help
Following is a sample URL:
notenik://help?id=versionhistory
Once more, let’s break this down:
notenik://
- The custom scheme that will invoke the Notenik app.help
- The Notenik command to open the Notenik Knowledge Base supplied with Notenik.?
- A question mark indicates the end of the command and the beginning of the query string.
id=versionhistory
- The ID identifying the Note to be selected for Display.
The query string is optional. If it is not supplied, then the Knowledge Base will be opened at the first Note in the Collection.
Settings
Following is a sample URL:
notenik://settings
This command simply brings up the overall Application Settings window, to allow the user to adjust one or more of the global settings.