create account

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

View this thread on: hive.blogpeakd.comecency.com
· @contrabourdon ·
$9.35
Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API
![IMG_0149.jpg](https://files.steempeak.com/file/steempeak/contrabourdon/aDMdDlxq-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](https://a.paddle.com/v2/click/30842/101639?link=1061) by *folivora.AI GmbH* (folivora are sloth and the AI is a specific kind of sloth).

![image.png](https://files.steempeak.com/file/steempeak/contrabourdon/Dyjm1DSy-image.png)

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

- https://uploadbeta.com/api/steemit/account/vp/?cached&id=justyy
- https://uploadbeta.com/api/steemit/account/sp/?cached&id=justyy
- https://uploadbeta.com/api/steemit/account/reputation/?cached&id=justyy
- https://uploadbeta.com/api/steemit/info/

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](https://stedolan.github.io/jq/download/))
```
#! /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:
<center><img src="https://steemitimages.com/350x350/https://files.steempeak.com/file/steempeak/contrabourdon/ApVZAMoy-image.png">
</center>

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

<center>![image.png](https://files.steempeak.com/file/steempeak/contrabourdon/QUW5fE01-image.png)
</center>

Now I don't have to keep flicking back to my [steemworld.org](https://steemworld.org) tab to check on my stats (so regularlyโ€”it's not a replacement for that great tool!).
<hr>

<center>
## Consider using one of your <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=untersatz&approve=1">witness votes on untersatz!</a>
[<img src="https://steemitimages.com/0x0/https://files.steempeak.com/file/steempeak/organduo/9iWLfQY8-IMG_20190819_203521.jpg">](https://steemit.com/~witnesses)
*Run by myself and <a href="https://steempeak.com/@organduo">organduo</a>โ€”supporting the community with regular contests: Easy SBI Contest, Pinky and Spiky Drawing Contest and Secrets of Organ Playing Contest. Also powering the popular <a href="https://steempeak.com/@giphy">giphy bot</a> and donating STEEM for <a href="https://steempeak.com/@deemarshall">deemarshall</a>'s creative contests.*</center>
<center>[You can also support me using Steem Basic Income](https://app.steemconnect.com/sign/transfer?to=steembasicincome&amount=1.000%20STEEM&memo=contrabourdon)</center>

<center>[<img src="https://cdn.steemitimages.com/DQmcoook3QEdV34PeAgmQbqfq7qujPzPrr2sM5SH6nLHn53/image.png">](https://www.patreon.com/jamesfloresorganist)</center>

<center>[<img src="https://steemitimages.com/DQmSQnxEBigCNXYe3hUB5ujRMmAvq1r851wGFc5LwZTkfRv/rebelheart.png">](https://steemit.com/qurator/@qurator/qurator-4-0-or-new-multiplier-system)</center>

<center>
![Classical_Music_smaller.png](https://steemitimages.com/DQmeoERDzqJXs2uwJ3BQjuKvTEQf4jjhCxuAr6pt87qkGr5/Classical_Music_smaller.png)


The classical music community at #classical-music and [Discord](https://discord.gg/ppVmmgt).
Follow our community accounts @classical-music and @classical-radio. 
Follow our curation trail (classical-radio) at [SteemAuto](steemauto.com)
Community Logo by ivan.atman

<a href="https://smartsteem.com?r=contrabourdon" target="_blank"><img src="https://smartsteem.com/static/smartsteem_banner.gif" /></a>

[<img src="https://cdn.steemitimages.com/DQmc6z55Eu8NEE4Cd8W5zmPT7i7aYiyHgHg69oUTCbkbp3A/tabanner-slim-contrabourdon.png">](https://steempeak.com/@contrabourdon)
</center>
๐Ÿ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 163 others
properties (23)
authorcontrabourdon
permlinksteem-stats-on-my-macbook-pro-touch-bar-or-four-simple-scripts-with-justyy-s-api
categorystem
json_metadata{"app":"steempeak/1.16.1","format":"markdown","tags":["stem","palnet","neoxian","marlians","upfundme","steemdev","steem","apple","tech","teamaustralia"],"users":["justyy","organduo","giphy","deemarshall","qurator","classical-music","classical-radio.","contrabourdon"],"links":["https://a.paddle.com/v2/click/30842/101639?link=1061","/@justyy","https://steemyy.com/","https://uploadbeta.com/api/steemit/account/vp/?cached&amp;id=justyy","https://uploadbeta.com/api/steemit/account/sp/?cached&amp;id=justyy","https://uploadbeta.com/api/steemit/account/reputation/?cached&amp;id=justyy","https://uploadbeta.com/api/steemit/info/","/@justyy","https://stedolan.github.io/jq/download/","https://steemworld.org"],"image":["https://files.steempeak.com/file/steempeak/contrabourdon/aDMdDlxq-IMG_0149.jpg","https://files.steempeak.com/file/steempeak/contrabourdon/Dyjm1DSy-image.png","https://steemitimages.com/350x350/https://files.steempeak.com/file/steempeak/contrabourdon/ApVZAMoy-image.png","https://files.steempeak.com/file/steempeak/contrabourdon/QUW5fE01-image.png","https://files.steempeak.com/file/steempeak/organduo/9iWLfQY8-IMG_20190819_203521.jpg","https://cdn.steemitimages.com/DQmcoook3QEdV34PeAgmQbqfq7qujPzPrr2sM5SH6nLHn53/image.png","https://steemitimages.com/DQmSQnxEBigCNXYe3hUB5ujRMmAvq1r851wGFc5LwZTkfRv/rebelheart.png","https://steemitimages.com/DQmeoERDzqJXs2uwJ3BQjuKvTEQf4jjhCxuAr6pt87qkGr5/Classical_Music_smaller.png","https://smartsteem.com/static/smartsteem_banner.gif","https://cdn.steemitimages.com/DQmc6z55Eu8NEE4Cd8W5zmPT7i7aYiyHgHg69oUTCbkbp3A/tabanner-slim-contrabourdon.png"]}
created2019-09-11 02:05:36
last_update2019-09-11 02:05:36
depth0
children16
last_payout2019-09-18 02:05:36
cashout_time1969-12-31 23:59:59
total_payout_value4.014 HBD
curator_payout_value5.334 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,800
author_reputation224,782,047,497,429
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries
0.
accounthauptwerk
weight2,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,460,085
net_rshares27,727,506,553,699
author_curate_reward""
vote details (227)
@amico ·
$0.02
Hey, that's a really cool use of the MacBook Pro Touch Bar: well done, mate!

!BEER & !giphy Touch+Bar ;)
๐Ÿ‘  , ,
properties (23)
authoramico
permlinkre-contrabourdon-pxnb05
categorystem
json_metadata{"tags":["stem"],"app":"steempeak/1.16.1"}
created2019-09-11 02:31:18
last_update2019-09-11 02:31:18
depth1
children2
last_payout2019-09-18 02:31:18
cashout_time1969-12-31 23:59:59
total_payout_value0.012 HBD
curator_payout_value0.011 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length105
author_reputation51,076,240,298,517
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,460,502
net_rshares109,361,428,511
author_curate_reward""
vote details (3)
@contrabourdon ·
Thanks!

Posted using [Partiko iOS](https://partiko.app/referral/contrabourdon)
๐Ÿ‘  
properties (23)
authorcontrabourdon
permlinkcontrabourdon-re-amico-re-contrabourdon-pxnb05-20190911t093058336z
categorystem
json_metadata{"app":"partiko","client":"ios"}
created2019-09-11 09:31:00
last_update2019-09-11 09:31:00
depth2
children0
last_payout2019-09-18 09:31:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length79
author_reputation224,782,047,497,429
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,469,000
net_rshares140,055,878
author_curate_reward""
vote details (1)
@giphy ·
<img src="https://media0.giphy.com/media/3otPoJQqJSIeJgueMU/giphy.gif?cid=0aaf8a74c23fc5330ee922ec50c210dbfc4c5e60f005274d&rid=giphy.gif" /><br><a href="https://giphy.com/gifs/apple-event-macbook-pro-touch-bar-3otPoJQqJSIeJgueMU"><img src="https://files.steempeak.com/file/steempeak/echobourdon/SCyDAmrs-PoweredBy_200px-White_HorizLogo.png" /></a><br>// You can support giphy by using one of your witness votes on <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=untersatz&approve=1">untersatz</a>! //
๐Ÿ‘  ,
properties (23)
authorgiphy
permlinkc6skv3ce5g5
categorystem
json_metadata""
created2019-09-11 02:31:27
last_update2019-09-11 02:31:27
depth2
children0
last_payout2019-09-18 02:31:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length523
author_reputation1,297,028,681,726
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,460,503
net_rshares0
author_curate_reward""
vote details (2)
@beerlover ·
<div class='pull-right'>https://cdn.steemitimages.com/DQmXK1U89BrMJHwgv6BysSpYswN7NA39URStPi65azu3PJo/Sich%20f%C3%BCllendes%20Bierglas.gif<p><sup>To view or trade <code>BEER</code> go to <a href='https://steem-engine.com/?p=market&t=BEER'>steem-engine</a>.</sup></p></div><center><br><br> <p> Hey @contrabourdon, here is your <code>BEER</code> token. Enjoy it!</p> </center>
properties (22)
authorbeerlover
permlinkre-steem-stats-on-my-macbook-pro-touch-bar-or-four-simple-scripts-with-justyy-s-api-20190911t023126z
categorystem
json_metadata"{"app": "beem/0.21.1"}"
created2019-09-11 02:31:27
last_update2019-09-11 02:31:27
depth1
children0
last_payout2019-09-18 02:31:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length374
author_reputation25,811,331,779,356
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,460,504
net_rshares0
@cadawg ·
Very cool!
properties (22)
authorcadawg
permlinkre-contrabourdon-py78lq
categorystem
json_metadata{"tags":["stem"],"app":"steempeak/1.17.1"}
created2019-09-21 20:51:27
last_update2019-09-21 20:51:27
depth1
children0
last_payout2019-09-28 20:51:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length10
author_reputation100,771,927,095,688
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,800,957
net_rshares0
@catscientist ·
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!
properties (22)
authorcatscientist
permlinkre-steem-stats-on-my-macbook-pro-touch-bar-or-four-simple-scripts-with-justyy-s-api-20190911t022237z
categorystem
json_metadata"{"app": "rewarding/0.1.5"}"
created2019-09-11 02:22:39
last_update2019-09-11 02:22:39
depth1
children0
last_payout2019-09-18 02:22:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length223
author_reputation785,924,402,887
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,460,377
net_rshares0
@justyy ·
!thumbup
Upvoted and resteemed! Thanks for the shout!
๐Ÿ‘  , , , , , , , , , , ,
properties (23)
authorjustyy
permlinkpxo23e
categorystem
json_metadata{"tags":["stem"],"app":"steemit/0.1"}
created2019-09-11 12:16:27
last_update2019-09-11 12:16:27
depth1
children3
last_payout2019-09-18 12:16:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length53
author_reputation280,616,224,641,976
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,472,515
net_rshares29,292,444,349
author_curate_reward""
vote details (12)
@witnesstools ·
## Hello @contrabourdon! You are great!
![](https://media.giphy.com/media/weUJO57AKHWfK/giphy.gif)

<hr/>

command: **!thumbup** is powered by witness @justyy and his contributions are: [https://steemyy.com](https://steemyy.com)
*[More commands](https://steemyy.com/#bots) are coming!*
properties (22)
authorwitnesstools
permlink20190911t121638310z
categorystem
json_metadata{"tags":["thumbup","bot-reply","justyy"],"app":"witnesstools"}
created2019-09-11 12:16:39
last_update2019-09-11 12:16:39
depth2
children2
last_payout2019-09-18 12:16:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length286
author_reputation159,850,393,835
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,472,522
net_rshares0
@contrabourdon ·
!giphy thumbs+up

Posted using [Partiko iOS](https://partiko.app/referral/contrabourdon)
properties (22)
authorcontrabourdon
permlinkcontrabourdon-re-witnesstools-20190911t121638310z-20190911t122125781z
categorystem
json_metadata{"app":"partiko","client":"ios"}
created2019-09-11 12:21:27
last_update2019-09-11 12:21:27
depth3
children1
last_payout2019-09-18 12:21:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length88
author_reputation224,782,047,497,429
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,472,613
net_rshares0
@ocdb ·
re-contrabourdon-steem-stats-on-my-macbook-pro-touch-bar-or-four-simple-scripts-with-justyy-s-api-20190911t021353830z
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. :)
properties (22)
authorocdb
permlinkre-contrabourdon-steem-stats-on-my-macbook-pro-touch-bar-or-four-simple-scripts-with-justyy-s-api-20190911t021353830z
categorystem
json_metadata{"app":"ocdb/1.9.3"}
created2019-09-11 02:13:57
last_update2019-09-11 02:13:57
depth1
children0
last_payout2019-09-18 02:13:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length458
author_reputation759,928,837,673,375
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,460,244
net_rshares0
@organduo ·
Now I have FOMO for MacBook Pro...
๐Ÿ‘  
properties (23)
authororganduo
permlinkre-contrabourdon-pxni9o
categorystem
json_metadata{"tags":["stem"],"app":"steempeak/1.15.5"}
created2019-09-11 05:08:12
last_update2019-09-11 05:08:12
depth1
children4
last_payout2019-09-18 05:08:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length34
author_reputation241,344,590,388,394
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,463,549
net_rshares139,297,057
author_curate_reward""
vote details (1)
@contrabourdon ·
Easily solved. Just get one. 

Posted using [Partiko iOS](https://partiko.app/referral/contrabourdon)
๐Ÿ‘  
properties (23)
authorcontrabourdon
permlinkcontrabourdon-re-organduo-re-contrabourdon-pxni9o-20190911t080532131z
categorystem
json_metadata{"app":"partiko","client":"ios"}
created2019-09-11 08:05:33
last_update2019-09-11 08:05:33
depth2
children3
last_payout2019-09-18 08:05:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length101
author_reputation224,782,047,497,429
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,467,210
net_rshares138,542,674
author_curate_reward""
vote details (1)
@organduo ·
But then Bill Gates will be angry with me...
properties (22)
authororganduo
permlinkre-contrabourdon-pxpj8n
categorystem
json_metadata{"tags":["stem"],"app":"steempeak/1.16.1"}
created2019-09-12 07:24:24
last_update2019-09-12 07:24:24
depth3
children2
last_payout2019-09-19 07:24:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length44
author_reputation241,344,590,388,394
root_title"Steem stats on my MacBook Pro Touch Bar | Four simple scripts with @justyy's API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,499,360
net_rshares0