For the past ten years, I’ve created a playlist for each season. I wrote about this before when I made Jekyll data playlists. At the end of each season, the playlist gets a post and I store all the data in
_data/playlists.yml (for safe keeping).
Tired: Doing this work manually.
Wired: Using this handy script.
Under the hood
- The script gets the playlist from Spotify.
- Next, it formats the tracks with exactly the data I’ll need for later.
- With the new dataset, it creates a post and formats it to my liking.
- Then updates the master playlist by reading the file, appending the new data, and then saving it.
- Finally, the script downloads the playlist image.
When I’m ready to turn a Spotify playlist into a post, I run from terminal:
In a few seconds, the script has updated
_data/playlist.yml, created a new post, and downloaded a thumbnail image for the post.
You can find the code on GitHub to learn how to set it up for yourself.
Did you enjoy this post? Support The Human Utility. The Human Utility provides assistance to families and makes sure they always have running water at home.