shpub - micropub client for the shell

Over the last weeks I have been working on shpub, a Micropub client for the shell. It allows you to publish blog posts, replies/coments and likes from the shell or programmatically. ​

Instagram​

I wrote it because I needed a way to archive Instagram posts to a self-hosted blog. The internet-hater Instagram requires one to get approval for API clients, and only approves those that fall into a very narrow set of categories. ​

But thanks to the great new all-is-javascript world, Instagram data don't have to be scraped at all - simply adding ?__a=1 to one of its URLs gives you the data in JSON. Downloading all data wasn't a problem now, I only had to find a way to put the photos and videos into a blog now.. ​

I first experimented with wp-cli, the WordPress command line interface. It kind of worked, but the theme didn't look nice, and there were some limitations I could not get around. Known on the other hand had all features I needed, a nice-looking layout - and no own API, but a Micropub endpoint. ​

Micropub​

Micropub is a protocol for creating, updating and deleting all types of content on a server: Blog posts, replies/comments, likes, bookmarks, event reservations and more. It's backed by the W3C and currently in Draft status. ​

The goal is to have a standardized API to post content to your website, and you may use the client that's most suited for the job. ​

Currently we have generic clients like Quill, feed readers like Woodwind that have in-built commenting support, very specific ones like the Pushup-counter iOS app, an XMPP bot and more. See the Micropub client list for more information. ​

There are even services that act as Micropub client. For example, OwnYourGram instantly posts your own Instagram images to your blog. OwnYourCheckin does the same for Fourquare checkins. ​

On the other hand, there are micropub endpoints that act as proxy for other websites: silo.pub allows you to use a Micropub client to write comments on Github, Facebook or Twitter. ​

shpub​

I needed a way to send Micropub requests to the Known instance, and there was no tool for it. So I sat down and wrote shpub with the goal to make a command line interface I can use from my instagram2micropub script. ​

During the process I learned a lot, found many bugs in Known's micropub endpoint and in the Wordpress micropub endpoint, and got to know Known's internals. ​

After some documentation work, the IndieWeb wiki now has a comparison of Micropub servers and Micropub clients. ​

shpub was the second Micropub client to support Media endpoints, and is - as far as I know - the only one that supports updates. It's almost feature-complete and works fine with instagram2micropub. ​

Get it from its homepage or github. ​

Written by Christian Weiske.

Comments? Please send an e-mail.