#nippo/
Last active
January 29, 2019 14:59
-
-
Save monzou/692b0999dcc4658ec80014185c9a2481 to your computer and use it in GitHub Desktop.
Bear note templates
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
on alfred_script(q) | |
tell application "Terminal" | |
activate | |
do script q | |
delay 0.5 | |
quit | |
end tell | |
end alfred_script |
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
#!/bin/sh | |
cwd=$(pwd) | |
cd $(dirname "$0") | |
date=`date "+%Y/%m/%d"` | |
title=$2 | |
template="$1.md" | |
text=`cat ./$template | sed -e "s#<TITLE>#${title:-日報}#g" | sed -e "s#<DATE>#$date#g"` | |
open "bear://x-callback-url/create?text=$text" | |
cd "${cwd}" | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment