Importing check-ins from Ohai

I’ve used a few apps over the years for location check-ins. Gowalla, Foursquare, and Ohai, which was built on the App.net API. The Gowalla data was lost after they were acquired by Facebook. I’ve continued to use Foursquare and have imported many of those check-ins to my location site manton.coffee.

I have about a year of data from Ohai, from around 2013-2014. Before App.net shut down, I exported the data. I wanted to dust it off and import it into Micro.blog.

The data is stored in the App.net “messages” JSON. In some cases, there is annotation data that includes the location information such as place name for the check-in and latitude/longitude.

Here’s an example of one of the check-ins, cleaned up slightly to remove fields I don’t care about:

{
  "annotations": [
    {
      "type": "net.app.ohai.location",
      "value": {
        "address": "11521 N Fm 620",
        "country_code": "us",
        "latitude": 30.45419,
        "locality": "Austin",
        "longitude": -97.8271,
        "name": "Starbucks",
        "postcode": "78726",
        "region": "TX"
      }
    }
  ],
  "created_at": "2013-11-11T14:44:25Z",
  "id": "1922259",
  "source": {
    "client_id": "nymmngm43jnYP2FQ4pCvXjBpT3YyfNDa",
    "link": "http://ohaiapp.net/",
    "name": "Ohai"
  },
  "text": "Working after tacos. Hoping to get some coding done with an early start to the week."
}

I had originally used Ohai as a sort of private check-in journal, not intending it to be public in the way that Foursquare check-ins often are. But I’ve found that after nearly 10 years, semi-private data like this can usually be public without the same kind of privacy considerations that I would have worried about at the time it was first written.

So how do we get this data into Micro.blog? Micro.blog can import from a bunch of platforms, but it doesn’t make sense to add support for this file format directly to Micro.blog. It’s not something that most people would need. I wrote a custom script to handle this for my check-ins blog.

In the script, we’ll iterate over each message and look for the ones posted from Ohai, ignoring everything else. For some reason — maybe because I was offline or because of limitations in the App.net places database — not all of my messages included location information, but I still want to record the post and date because it included text I wrote about the check-in. If there is location information, we’ll pass that to Micro.blog too.

Here’s the script. If you want to customize it for your own use, make sure to set the app token and blog URL.

Micro.blog uses the Micropub API for creating posts. When there’s location information, we’ll pass a checkin field to store that with Micro.blog. We can then access that data from a Micro.blog theme, for example to show a map. See my book chapter on Micropub for details on the JSON format.

I had a lot of fun going through this old data and migrating it to Micro.blog so that it can be preserved. Eventually I want to have a Micro.blog-based client solution for new check-ins, starting with Sunlit for iOS, so that I don’t need to keep depending on Foursquare.

Manton Reece @manton