Created
July 2, 2019 15:54
-
-
Save ekingery/327fd67066e5518e7500e8cc2f231ed5 to your computer and use it in GitHub Desktop.
Single-User Tweekly
This file contains hidden or 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
# sub last.fm $USER and $KEY, uses https://github.com/twitter/twurl | |
38 12 * * 0 /usr/local/bin/twurl -X POST -H api.twitter.com "/1.1/statuses/update.json?status=♬ This week's top spins on $USER Last FM `curl -s "http://ws.audioscrobbler.com/2.0/?method=user.getWeeklyTrackChart&user=$USER&api_key=$KEY&format=json" | sed s='#'==g | sed s='@'==g | jq -r '[.weeklytrackchart.track[] | .attr.rank, .artist.text, .name]' | grep -v "\]" | grep -v "\[" | paste -d" " - - - | cut -b 3- | sed s#'"'##g | sed 's#,##g' | sed s#' '#'_'#g | head -5`" | jq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment