You are viewing a single comment's thread from:

RE: Tutorial: So könnt Ihr auf der Apple Touch Bar eures MacBook die Kurse von STEEM, Bitcoin und anderen Cryptos anzeigen lassen

in #cryptos7 years ago

Aus aktuellem Anlass. So bekommt Ihr die neuen Bitcoin Cash auf die TouchBar. :)

on replace_chars(this_text, search_string, replacement_string)
if this_text contains the search_string then
set AppleScript's text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript's text item delimiters to ""
end if
return this_text
end replace_chars

set stockValue to do shell script "curl -s 'https://min-api.cryptocompare.com/data/price?fsym=BCH&tsyms=EUR' | grep 'EUR'"
set stockValue to replace_chars(stockValue, "{"EUR":", "")
set stockValue to replace_chars(stockValue, "}", "")
return "" & "€" & stockValue

Coin Marketplace

STEEM 0.19
TRX 0.14
JST 0.030
BTC 61240.20
ETH 3247.86
USDT 1.00
SBD 2.45