Created
January 16, 2020 10:59
-
-
Save kirkegaard/c0aad2b99914bea85b3deb214c76fa90 to your computer and use it in GitHub Desktop.
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 | |
json=$(curl -s "http://ws.audioscrobbler.com/2.0/?method=user.getRecentTracks&api_key=$LASTFM_APIKEY&user=$LASTFM_USERNAME&format=json") | |
artist=$(echo $json | jq -r '.recenttracks.track[0].artist["#text"]') | |
song=$(echo $json | jq -r '.recenttracks.track[0].name') | |
echo "♫ $artist - $song" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment