Skip to content

Instantly share code, notes, and snippets.

@vquaiato
Created June 8, 2018 00:58
Show Gist options
  • Save vquaiato/10dc21e62b8b3846c7d378fd82a2865e to your computer and use it in GitHub Desktop.
Save vquaiato/10dc21e62b8b3846c7d378fd82a2865e to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
cat cards.txt | while read card; do
clean=$(echo $card | sed 's/ /+/g' | sed "s/[',]//g")
url=$(echo "https://api.scryfall.com/cards/named\?exact\=${clean}")
echo "${card};$(curl -s "{$url}" | jq -r '.usd' | sed 's/\./,/g')"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment