You know that feeling when you have a personal project that just itches to be built? A random walk down a rabbit hole where you keep going deeper and deeper until you’ve created a tiny tool that didn’t exist before? I had that exact feeling this past week as I was working on redesigning my blog (I know, I know, I’m always redesigning).
As part of the revamp, I wanted to add a Now page (inspired by Derek Sivers) to showcase what I’m currently jamming to. I figured, why not syndicate my scrobbles from Last.fm to keep it always up-to-date?
Turns out, my Last.fm scrobbles were lagging behind. So, I put on my developer hat and started digging for a way to update them, specifically for Apple Music subscribers like myself. I hit a roadblock pretty quickly – there wasn’t a straightforward way to do it.
But then, a lightbulb moment! I realized I could download my entire Apple Music play history from Apple’s privacy portal. The data was all there, ripe for the picking. So I thought, what if I could whip up a tool to parse that data and convert it into a format that Last.fm and other scrobbling services could understand?
Fast forward two days, and voila! I had a working prototype. But I didn’t stop there. I wanted to make it a web-based tool that anyone could use.
It’s crazy how easy it is to build out these ideas and share them with the world, making practical apps quickly. With the help of Claude 3 Opus, I was able to craft a user-friendly web app that I’m calling the Apple Music Play History Converter. It’s a nifty little tool that lets you convert your Apple Music play history data into a format compatible with Last.fm and Universal Scrobbler. And get this – it’s completely client-side. Your data never leaves your device.
Some of the key features include:
- Support for multiple Apple Music CSV file types
- Automatic reverse-chronological timestamping based on track duration
- Optional iTunes API integration to fetch missing artist info
- Real-time tabular preview of the converted data
- One-click copy to clipboard and download as CSV
- Under the hood, it’s powered by HTML, CSS (using the sleek Pico.css framework), JavaScript, and the Papa Parse library for parsing those pesky CSV files.
If you’re an Apple Music subscriber, give it a spin and head over to the hosted version at https://labs.ashrafali.net/historyconverter. The code is also available on GitHub if you want to take a peek or contribute.
As always, I’m open to feedback, suggestions, and virtual high fives. Feel free to drop me a line at [email protected] or check out more of my tinkerings at https://ashrafali.net.
Happy converting and scrobbling!