Created
July 8, 2022 21:21
-
-
Save SamadiPour/efde3d4bd85999ecc65cbcbbd0f0374f to your computer and use it in GitHub Desktop.
Bonbast Raycast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title bonbast | |
# @raycast.mode inline | |
# @raycast.refreshTime 3h | |
# Optional parameters: | |
# @raycast.icon 💰 | |
# @raycast.packageName Bonbast | |
# Documentation: | |
# @raycast.author Amir Hossein SamadiPour | |
# @raycast.authorURL https://github.com/SamadiPour | |
function thousands { | |
awk '{ printf("%'"'"'d\n",$1); }' | |
} | |
DATA="$(/opt/homebrew/bin/python3 -m bonbast export | jq -r .)" | |
USD="$(echo "$DATA" | jq '.USD.buy' | thousands)" | |
EUR="$(echo "$DATA" | jq '.EUR.buy' | thousands)" | |
GBP="$(echo "$DATA" | jq '.GBP.buy' | thousands)" | |
echo "🇺🇸 USD: ${USD} | 🇪🇺 EUR: ${EUR} | 🇬🇧 GBP: ${GBP}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment