-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
mintable.1h.zsh
36 lines (28 loc) · 987 Bytes
/
mintable.1h.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/zsh
# <bitbar.title>Mintable</bitbar.title>
# <bitbar.version>v2.0.0</bitbar.version>
# <bitbar.author>Kevin Schaich</bitbar.author>
# <bitbar.author.github>kevinschaich</bitbar.author.github>
# <bitbar.desc>Automate your personal finances – for free, with no ads, and no data collection.</bitbar.desc>
# <bitbar.image>https://github.com/kevinschaich/mintable/raw/release/2.0.0/docs/logo.png</bitbar.image>
# <bitbar.dependencies>node,mintable</bitbar.dependencies>
# <bitbar.abouturl>https://github.com/kevinschaich/mintable</bitbar.abouturl>
export PATH="/usr/local/bin:$PATH"
output=$(/usr/local/bin/mintable fetch) || exit $?
declare output_status
if [[ $? -eq 0 ]]
then
output_status="🍃"
else
output_status="❌"
fi
echo $output_status
echo ---
echo "..."
echo $output | tail -n 15 | head -n 12
echo "---"
link=`echo $output | tail -n 1`
echo $link
echo "View Spreadsheet | color=green href=$link"
echo "---"
echo "Refresh Now | color=blue refresh=true"