For all 0 people on the internet who have expressed interested in this project, I am deprecating this project since Spotify now requires OAuth credentials for all of its endpoints now in addition to its API token. This means that there needs to be some sort of automated credential renewer that will maintain proper OAuth credentials within this library. Since this project is pointless anyways, I don't really see a need to implement it; thus, I no longer plan on using this library. Feel free to fork and implement if you really need it.
A pointless GroupMe bot that integrates with Spotify to create summary gallery images from Spotify share links.
Written using Node.js with ES2015 & ES2016 features and transpiled via Babel.
I made this tool because a GroupMe music sharing group that I'm in relies on screenshots of your Spotify app while you're listening to music. Because GroupMe will archive all images sent in its gallery, this provides an easy way to look at all Spotify shares that have been sent to the app.
Unfortunately, this makes it very obnoxious to actually listen to the music because you now have to manually search for said artist/track in Spotify. Ugh!!! With this bot, we can port over to just utilizing Spotify share links (e.g., https://open.spotify.com/track/64aCMaBE1o5aExuqAtVht6). The bot will then parse these links, create a summary image with artist info using the Spotify API, and then send a generated image back to the chat so that the gallery archives are still retained. It gives the best of both worlds!
I also wanted to dork around with ES2015 & ES2016 features in node since I hadn't really done that before, so this was an opportunity to do so.
-
Run these commands:
cd some/installation/directory git clone git@github.com:rkoval/sbotify.git cd sbotify npm install
Add the
--only=prod
option tonpm install
if you're installing to production. This will prevent unnecessary dev dependencies from being installed. -
Modify the config and populate your Spotify and GroupMe API tokens. Also make sure to populate the GroupMe
groupId
so that your bot knows where to listen from and send to. -
Install ImageMagick. There are installation readmes in .txt form at the root of the project.
-
Install Ghostscript, which is necessary for ImageMagick fonts
brew install ghostscript
-
Make sure that your bot is configured for GroupMe:
See their documentation for more details on how to actually create a bot.
For local development, use the runtime transpiler (which is discouraged in production by Babel):
npm run dev
For production, transpile all JS resources and then run the generated assets:
npm postinstall && npm start
(See package.json for more details on what these tasks actually do.)
If the bot has successfully connected to GroupMe, you will see logging in the console exclaiming so. It will continue to listen for messages to parse until
Check out this crappy series of images to learn how to actually utilize the bot and verify that it's working properly: