Shortcuts and AppleScript
Notes that fit
into your routines.
Start a note from a shortcut, add a line to one from anywhere, read a note’s text into another app, or export it without opening a window. Cartamd only touches a file the shortcut passes in, or one inside a folder you already allowed.
Four actions in Shortcuts
The Shortcuts app lists Cartamd’s actions alongside Apple’s, on Mac, iPhone and iPad. Combine them with anything else: a daily note from a calendar, a reading list from the share sheet, a PDF for a folder action.
| Action | What it does |
|---|---|
| New Note | Opens an untitled note with your text. A Title becomes its first heading and suggested name. Nothing is saved until you save it. |
| Append to Note | Adds text to the end of a note on its own line. An open note gets it as one edit ⌘Z removes; a closed note is saved in one step, keeping its tags, dates and permissions. |
| Get Note Text | Returns a note’s Markdown, including unsaved edits. |
| Export Note | Exports a note as PDF, HTML, Word or EPUB with its appearance and your last contents and index choices. |
A shortcut
Get Clipboard
Append to Note
Text: Clipboard
Note: Reading list.mdThe note gets
# Reading list - [ ] *Pilgrim at Tinker Creek* - [x] *The Peregrine* https://en.wikipedia.org/wiki/Great_blue_heron
One line at the end, and the rest of the file untouched.
Ask Siri
Siri understands “New note in Cartamd”, “Append to a note in Cartamd” and “Export a note with Cartamd”.
AppleScript
On the Mac, Script Editor can work with open notes. Documents have name, modified and file, plus path and text. Setting text replaces the whole note as one edit ⌘Z undoes, and it saves like typing.
In Script Editor
tell application "Cartamd"
set noteText to text of front document
set text of front document to noteText & linefeed & "- Call Sam"
end tellWhat happens
The front note gains a last line, - Call Sam, which Cartamd shows as a list item straight away. Press ⌘Z in the note and it is gone again.