Created
June 25, 2022 15:59
-
-
Save aberezin/a168c5553057ea1eee79458a1364c2f2 to your computer and use it in GitHub Desktop.
fantastical command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ "${1/--help/-h}" == '-h' ]]; then | |
echo 'fan2add [-h | --help]' | |
echo 'fan2add [-i | --immediately] statement...' | |
echo | |
echo '##### Statement Examples ########' | |
cheat fantastical-statements | |
exit | |
fi | |
if [[ "${1/--immediately/-i}" == '-i' ]]; then | |
immediately="with add immediately" | |
shift | |
fi | |
osascript <<EOF | |
tell application "Fantastical 2" | |
parse sentence "$*" $immediately | |
end tell | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment