Mirror iTunes playlists to Spotify

At the moment, I have an Apple Music subscription. It’s great to be able to listen to more or less whatever music I want to. I switched from Spotify because they were missing a few artists that I actually did want to listen to. Unfortunately, there are a few things that Apple Music doesn’t do that I would like to have–chief among them the ability to play on a Roku.

One nice thing that Spotify does have though is a fairly powerful API: Spotify Web API. Inspired by a post on Spotify and billboard.py which automatically creates Spotify playlists from the Billboard music ranking charts, I decided to write up a script that can sync my playlists from iTunes to Spotify.


Backing up GitHub repositories

The newest chapter in my quest to collect entirely too much data / back up All The Things!: GitHub.

Basically, I want to back up all of my own personal GitHub repositories along with any from organizations that I am involved with. Strictly speaking, this is a little strange, since it’s unlikely that GitHub is going anywhere soon and, if it does, we are likely to have fair warning. But still, it’s nice to have a local copy just in case GitHub is down.


Backing up Moves Data

Another backup post, this time I’m going to back up my data from the Moves App (step counter + GPS tracker). Theoretically, it should be possible to get this same data from the app as part of my iOS Backup series, but the data there is in a strange binary format. Much easier to use their API.


Scraping Kindle Highlights

Edit March 2020: It seems the page ‘your highlights’ page on Amazon no longer exists, so this script no longer works. I’ll probably see if I can pull them from Goodreads instead now that the integration is there or directly from my Kindle, but for the moment, this script does not work.

As part of an ongoing effort to backup all the things, combined with a rather agressive 2015 Reading List, I wanted to the ability to back up any sections that I’ve highlighted on my Kindle. Unfortunately, Amazon doesn’t seem to have an API to do that, but why should that stop me?

Using a combination of Python and the Python libraries Requests and BeautifulSoup1, it’s entirely possible to write a Python script that will log into Amazon, get a list of all of the books on your account, and download the highlights for each.

Let’s do it!


iOS Backups in Racket: Groundwork

For the last little while, I’ve been spending my spare programming time working on a slightly larger project than I normally do: a Racket library for reading iOS backups.

Basically, I want to take the mess that is an iOS backup (not particularly designed to be easy to read by other programs) and extract some information from it, backing it up in a more easily readable format.

Specifically, I would like to be able to backup:

  • Contact information: Even thought they’re mostly from Facebook, it will be useful for the other parts
  • Messages: These are taking up a large portion of my phone’s hard drive, mostly due to attachments. Back them up just in case12
  • Photos: I’m already backing these up, but it would be nice to have it in the same process
  • Application data:
  • List of applications over time
  • Moves: GPS location
  • Downcast: List of current podcasts
  • Sleep Cycle: Sleep data
  • Boardgame Scorer: High scores for board games


Backing up Google Reader / Calendar

Similar to my previous post about backing up Gmail, this time I want to back up my here, from there it should be easy enough to derive the one for Google Calendar. First, we have the same setup as last time. Yes, I’m still storing the passwords in plaintext. Perhaps I’ll write up a way to avoid this in the future. #!/usr/bin/env python import urllib, urllib2 username = '#####' password = '#####' For the next step, I’m going to fetch Google’s login page using urllib.


Backing up Gmail

A little while ago, I decided to finally get around to backing up everything. I’m pulling all of my files from both my website and the servers on campus to my desktop at home, backing my desktop up to an external hard drive, and pushing those backups to an offsite location. The former two steps are using here. First, some basic setup. Of course, I’ve blanked out my own username and password.