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

in #stem2 years ago

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


Sort:  

Hey, that's a really cool use of the MacBook Pro Touch Bar: well done, mate!

!BEER & !giphy Touch+Bar ;)

Thanks!

Posted using Partiko iOS



// You can support giphy by using one of your witness votes on untersatz! //

!thumbup
Upvoted and resteemed! Thanks for the shout!

Hello @contrabourdon! You are great!


command: !thumbup is powered by witness @justyy and his contributions are: https://steemyy.com
More commands are coming!

!giphy thumbs+up

Posted using Partiko iOS



// You can support giphy by using one of your witness votes on untersatz! //

Now I have FOMO for MacBook Pro...

Easily solved. Just get one.

Posted using Partiko iOS

But then Bill Gates will be angry with me...

!giphy why+not+both

Posted using Partiko iOS



// You can support giphy by using one of your witness votes on untersatz! //

You got a 13.90% upvote from @ocdb courtesy of @contrabourdon!

@ocdb is a non-profit bidbot for whitelisted Steemians, current min bid is 2 SBD and max bid is 10 SBD and the equivalent amount in STEEM. Check our website https://thegoodwhales.io/ for the whitelist, queue and delegation info. Join our Discord channel for more information.

If you like what @ocd does, consider voting for ocd-witness through SteemConnect or on the Steemit Witnesses page. :)

Thank you for supporting @CatsMakeKittens by being a part of our community @contrabourdon.

Each CATS you purchase gets you daily upvotes from me @CatScientist as our community grows so do your rewards for being a member!

To view or trade BEER go to steem-engine.



Hey @contrabourdon, here is your BEER token. Enjoy it!

Very cool!