# macos-shortcuts
This project contains a rust crate that can be used to interact with
[Apple Shortcuts for Mac].
The crate currently supports loading shortcuts and executing them. It uses
[AppleScript] and the [osascript] command to load the data because this is the
only obvious way to be able to load the icon data associated with the shortcut.
To be more efficient at executing the shortcut and allowing input and output
data to be correctly processed it uses the [shortcuts] command.
There seem to be two small bugs with the `shortcuts` command. Firstly it
doesn't seem to allow using `-` as the output filename to pipe directly to
`stdout` (this may be the same for input but this hasn't been tested). Secondly
It doesn't seem to like the `.` character in filenames, so the temporary files
created for input and output have had the `.` character removed from their
names.
[Apple Shortcuts for Mac]: https://support.apple.com/en-gb/guide/shortcuts-mac/welcome/mac
[AppleScript]: https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html
[osascript]: x-man-page://osascript
[shortcuts]: x-man-page://shortcuts