Created
February 25, 2015 07:03
-
-
Save ayasuda/99adae00c7c6ab936e66 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
TOKEN="your token via https://api.slack.com/web" | |
CHANNEL="slack channel to post" | |
MUSIC=`osascript <<'END' | |
tell application "iTunes" | |
set trackName to name of current track | |
set trackArtist to artist of current track | |
return trackName & " / " & trackArtist | |
end tell | |
END | |
` | |
echo "I'm Playing $MUSIC" | slackcat -k $TOKEN -c $CHANNEL -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment