diff --git a/includes/bash_functions.bash b/includes/bash_functions.bash index 4e24a51..67fa197 100644 --- a/includes/bash_functions.bash +++ b/includes/bash_functions.bash @@ -242,6 +242,27 @@ function rasterize() { fi } +# Add note to Notes.app (OS X 10.8) +# Usage: note "foo" or echo "foo" | note +function note() { + local text + if [ -t 0 ]; then # Argument + text="$1" + else # Pipe + text=$(cat) + fi + body=$(echo "$text" | sed -E 's|$|
|g') + osascript >/dev/null <