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.

Simon Woods

It's always a odd to me that when people make these "Let's Try Different Blogging Hosts" posts that they ignore the broken support of interoperability from so many of the options.

Seems especially problematic when you consider the resources available to the likes of Automattic and Ghost. Surely it's even more important to expect them to do a better job at enabling their customers to have the freedom to move.

Jason Becker

@SimonWoods what pisses me off more is that I've seen people complain about .bar (even though there are a bunch of options from MB to export and .bar is pretty easy to work with) while non-ironically praising the terrible formats of other services and that other services are bad at supporting alternatives to their own import/export.

Rene van Belzen

@jsonbecker @SimonWoods Stockholm syndrome, perhaps? You love what you're used to, even it's clearly out to hurt you, milk every penny out of your wallet. And you let it, because you love it, sort of.

Paul Robert Lloyd

Am wondering if support for .bar would improve if there were an official website for it, with some type of specification and examples, much like there is for JSON Feed. Also, maybe .bar support could be added to WordPress, Ghost, etc. via their plugin systems?

Manton Reece

@paulrobertlloyd Yes, both of those things would help for sure. I'm often not sure where to link to because there's not an official site for it.

Manton Reece

@paulrobertlloyd Decided to move ahead with part of this and registered blogarchive.org.

Numeric Citizen

let us know when the site is up!

Chuck Grimmett

Have you seen the Data Liberation project that is a focus of WordPress this year?

Migrating your site to WordPress, or exporting all your content from WordPress, should be possible in one click. I want WordPress’ export format to become the lingua franca of CMSes, whether coming to WordPress or moving within WordPress. 

https://wordpress.org/news/2024/01/data-liberation-in-2024/

I proposed your .bar format as a solution here: https://github.com/WordPress/data-liberation/discussions/51

Paul Robert Lloyd

Glad I could encourage your domain registration habit 😉

Ross Karchner

I know the mac app supports it-- but it seems a bit weird that I can't import a .bar into micro.blog, from the web.

Manton Reece

@rossk Completely agree. The archives can be so big, it's harder to process them on the web, but it's time for us to work on that. I'll make it a priority.

Manton Reece @manton
Lightbox Image