-
Notifications
You must be signed in to change notification settings - Fork 2
/
Actions for Shortcuts.mdtext
55 lines (30 loc) · 2.7 KB
/
Actions for Shortcuts.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
Title: Actions for Shortcuts
Tags: levels-outline.13 Integration.3 Actions for Shortcuts
Timestamp: 20220720164915
Seq: 13.3
Level: 3 - Section
Index: Shortcuts;
Class: non-version
Body:
Notenik provides a number of custom actions that you can use with [Shortcuts on Mac](https://support.apple.com/guide/shortcuts-mac/intro-to-shortcuts-apdf22b0444c/mac).
Shortcuts are available for the Mac starting with macOS Big Sur (version 11).
Note that the shortcuts we're discussing in this context are different from the [[keyboard shortcuts]] that have been available on the Mac from the beginning. The shortcuts we're discussing here are Apple's latest take on user-friendly automation scripts that can be composed using a graphical user interface, without having to resort to coding.
The following Notenik custom actions are available for use.
+ **Get Note Title** -- Returns the title of the last selected Note, from the frontmost Collection. No input parameters needed.
+ **Get Note Sharing Link** -- Returns a Notenik [[Custom URL]] pointing to the last selected Note, from the frontmost Collection. No input parameters needed.
+ **Get Note File Path** -- Returns the file path pointing to the file containing the last selected Note, from the frontmost Collection. No input parameters needed.
+ **Run Script** -- Runs a [[Script File]] given a path to the file.
+ **Add Note From Text** -- This action looks for a block of text as input, with the input text formatted following the usual [[Note File Format]]. Notenik will attempt to parse the text block in the same way that it would any Note file on disk, and create a new Note, and add it to the last referenced Collection. A useful example shortcut might be made with the following actions.
1. Ask for `Text` with `Title:`
2. Set variable `title` to `Provided Input`
3. Ask for `Text` with `Body:`
4. Set variable `body` to `Provided Input`
5. Text
Title: `title`
Body:
`body`
6. Add a Note from a Block of Text
Note that action 1 - 5 in the example above are standard scripting actions, and that action 6 is a custom Notenik action. Keep in mind, though, that the variables can be populated from any source, and that any of the fields available in your Collection can be populated in a similar way.
As with any macOS Shortcut, use the **Shortcut Details** to specify ways in which you might wish to invoke the shortcut, such as a global keyboard shortcut.
If successful, the `Add Note From Text` shortcut will return a Notenik [[Custom URL]] pointing to the just-added Note.
(BTW, thanks to [MacSparky](https://www.macsparky.com/fieldguides/) for his *Shortcuts for Mac Field Guide*, and in particular his "Idea Capture" sample shortcut.)