Created
December 23, 2015 23:18
-
-
Save patmaddox/6aab829e8d9c10fcd0ca to your computer and use it in GitHub Desktop.
zettlel scripts
This file contains hidden or 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
| tell application "nvALT" | |
| activate | |
| set title to "{query}" | |
| set zzid to do shell script "source ~/.bash_profile && make_zzid" | |
| set zettle_title to zzid & " " & title | |
| search zettle_title | |
| tell application "System Events" | |
| key code 52 -- Return, create note | |
| keystroke zettle_title | |
| key code 52 | |
| key code 52 | |
| keystroke "* " | |
| end tell | |
| end tell |
This file contains hidden or 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
| make_zzid() { | |
| ruby -e "require 'time'; print Time.now.utc.strftime('%y%m%d%H%M%S')" | |
| } | |
| zzid() { | |
| make_zzid | pbcopy | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment