Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API

IMG_0149.jpg

Believe me, I'm not a big fan of the MacBook Pro Touch Bar (mainly because I need to use the ESC key a lot and I can't feel it!), but I have found a good use for it. Why not display four essential Steem stats?

  1. My voting power
  2. My owned Steem Power
  3. My reputation score
  4. The current market price of STEEM in USD

You don't have to guess, but Apple don't provide this kind of functionality out of the box... I'm using the BetterTouchTool by folivora.AI GmbH (folivora are sloth and the AI is a specific kind of sloth).

image.png

The Steem data is made possible by witness @justyy (he deserves your vote!). He has a whole bunch of freely available APIs for the community. In particular, I am using:

To get this as a widget on the touch bar, I simply added a Shell Script/Task that calls @justyy's API and outputs the text. Here they are, for those of you that have MacBook Pro's with Touch Bars! (It's just a simple http request and some text manipulation)

vp.sh

#! /bin/bash

output=$(curl -s "https://uploadbeta.com/api/steemit/account/vp/?id=$1")
echo "VP [$output%]"

sp.sh

#! /bin/bash

output=$(curl -s "https://uploadbeta.com/api/steemit/account/sp/?id=$1")
sp=$(echo $output | xargs printf "%.*f" 3)
echo "SP [$sp]"

rep.sh

#! /bin/bash

output=$(curl -s "https://uploadbeta.com/api/steemit/account/reputation/?id=$1")
sp=$(echo $output | xargs printf "%.*f" 3)
echo "REP [$sp]"

mp.sh (requires jq)

#! /bin/bash

output=$(curl -s "https://uploadbeta.com/api/steemit/info/")
price=$(echo $output | /usr/local/bin/jq '.market_price' | xargs printf "%.*f" 3)
echo "MP [\$$price]"

The first three scripts take an argument for the username. Here's how it's configured in BetterTouchTool:


For extra prettiness, I use the Steemit branding colour as the button background :)

image.png

Now I don't have to keep flicking back to my steemworld.org tab to check on my stats (so regularly—it's not a replacement for that great tool!).


Consider using one of your witness votes on untersatz!


Run by myself and organduo—supporting the community with regular contests: Easy SBI Contest, Pinky and Spiky Drawing Contest and Secrets of Organ Playing Contest. Also powering the popular giphy bot and donating STEEM for deemarshall's creative contests.

You can also support me using Steem Basic Income


Classical_Music_smaller.png

The classical music community at #classical-music and Discord.
Follow our community accounts @classical-music and @classical-radio.
Follow our curation trail (classical-radio) at SteemAuto
Community Logo by ivan.atman


H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
16 Comments