-
Notifications
You must be signed in to change notification settings - Fork 2
/
Custom URL Scheme.mdtext
122 lines (76 loc) · 6.26 KB
/
Custom URL Scheme.mdtext
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Title: Custom URL Scheme
Tags: levels-outline.13 Integration.1 Custom URL Scheme
AKA: Custom URL
Timestamp: 20210627004934
Seq: 13.1
Level: 3 - Section
Index: URLs, custom; custom URL scheme;
Class: non-version
Body:
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](https://en.wikipedia.org/wiki/Percent-encoding). 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 each `label=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 to `id`, 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.
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 each `label=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 each `label=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 each `label=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.