The case for .bar

Micro.blog supports importing from a lot of different services: Twitter, WordPress, Medium, Tumblr, Ghost, Markdown, Substack, Write.as, Foursquare, Goodreads, and others. For each one we want to add, I download an archive from a test account on the external service to figure out what the format looks like, then write custom code to handle it.

None of these formats look anything like one another. Just a few examples:

  • WordPress uses an RSS file with extra fields for WordPress-specific info. No images are included, although they can be downloaded separately.
  • Ghost includes a JSON file with their own fields. There are some weird quirks like the placeholder string __GHOST_URL__ being used in image URLs.
  • Substack has a ZIP file with a CSV file inside and individual .html files for each post.

Some services have an even less stable format. Both Twitter and Instagram have changed their format after it was widely used, requiring us to retool our import. And Glass’s export file does not include post dates or text captions.

One of the great things about indie microblogging is owning your own domain and so being able to move between services. But without a common format, it can be very difficult to migrate posts.

This is why I proposed the Blog Archive format (.bar) back in 2017. It’s essentially a ZIP file with all the posts and images for your blog. It uses JSON and HTML. There is nothing in it that is specific to any one blog platform, but it’s easy to extend with your own data if needed.

Micro.blog for macOS even supports previewing these .bar files. Double-click the file and it will show a list of the posts that will be imported. And because it’s really just a .zip file, you can rename it and use it anywhere. Or treat it as a single file that can be backed up.

In the years since I started using .bar, I’ve still yet to see any competing file format that solves the same problem. I’d love to see it become more widely supported.

Manton Reece @manton