scripts: Add nomie script

nomie script allows me to quickly journal to my habit tracking app from
the commandline.
This commit is contained in:
Marty Oehme 2020-10-28 21:21:29 +01:00
parent 547dbc9966
commit c2f3e38e82
Signed by: Marty
GPG Key ID: B7538B8F50A1C800
1 changed files with 11 additions and 0 deletions

11
scripts/.local/bin/nomie Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env sh
# this script logs a new entry in nomie - https://nomie.app/ - an open source habit tracker and journaling app
# It will very simply take the text input and pass it on.
sendtonomie() {
req="{\"note\":\"$*\",\"api_key\":\"$(pass show websites/nomie.app/apikey)\"}"
echo "$req"
curl -s -H "Content-Type: application/json" --compressed --data "$req" https://nomieapi.com/log
}
sendtonomie "$@"