From aee545d2b902e8c433ee6b8c42fb15fda0038366 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Thu, 2 Jan 2020 13:28:05 +0100 Subject: [PATCH] Query Zeus Tab status from the command line --- local/bin/zeustab | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 local/bin/zeustab diff --git a/local/bin/zeustab b/local/bin/zeustab new file mode 100755 index 0000000..f445d21 --- /dev/null +++ b/local/bin/zeustab @@ -0,0 +1,14 @@ +#!/bin/sh +base='https://tab.zeus.gent' +user='felixvdj' +token="$(pass show ugent/zeus/tab)" + +query="$base/users/$user.json" + +[ "$1" = "hist" ] && query="$base/users/$user/transactions.json" + +curl --header 'Accept: application/json' \ + --header 'Content-Type: application/json' \ + --header "Authorization: Token token=$token" \ + --location \ + "$query"