Skip to content

Instantly share code, notes, and snippets.

@patmaddox
Created December 23, 2015 23:18
Show Gist options
  • Select an option

  • Save patmaddox/6aab829e8d9c10fcd0ca to your computer and use it in GitHub Desktop.

Select an option

Save patmaddox/6aab829e8d9c10fcd0ca to your computer and use it in GitHub Desktop.
zettlel scripts
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
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