From c2f3e38e82567dfa47baa1cd70b742461de0173d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 28 Oct 2020 21:21:29 +0100 Subject: [PATCH] scripts: Add nomie script nomie script allows me to quickly journal to my habit tracking app from the commandline. --- scripts/.local/bin/nomie | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/.local/bin/nomie diff --git a/scripts/.local/bin/nomie b/scripts/.local/bin/nomie new file mode 100755 index 0000000..20e1b31 --- /dev/null +++ b/scripts/.local/bin/nomie @@ -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 "$@"