So, a few months ago, Flickr decided to change their terms and conditions so that they could sell your Creative Commons photos. This got a lot of people’s goat, myself included since I’m a paid user, and have been for a while (as an aside, had Yahoo done it as a profit share, it would have been awesome for everybody, but noooo…)

Because self hosting in this post Snowden world is only ever going to be a good thing, I don’t want my family photos used in corporate branding without a cut, and because I wanted to be a good #indieweb citizen, I thought I’d take the plunge and move to self hosting.

I’ve tried this before with Trovebox Community Edition but didn’t have much success – while their Flickr data export seemed to work, the import didn’t. They’ve probably got it working by now, but I pretty much gave up.

Anyway, since I’m a contributor to Known, I thought I’d dogfood and hack together an importer.

Flickr Importer for Known

The importer works by calling the Flickr API using credentials stored in your linked Flickr account. To do this, it uses the Flickr syndication plugin to do the donkey work of linking your accounts.

Once activated, and your Flickr account is linked, you are given the option to run an import.

The import job will run in the background, and will import all your photos and videos into your photostream (using the Photo and Media plugins which should also be activated), preserving timestamps, titles, body and tags.

At the time of writing I’ve not got it importing photosets and collections, since Known currently lacks a logical mapping, but I’m keen to at least record this information for later processing. The script will import sets and collections as generic data items, which you can expose by writing support into your theme.

The plugin records state, so it should recover from crashes, and you can re-sync safely at any time.

Have a play and let me know what you think! Pull requests are of course welcome.

» Visit the project on Github...

Known comes bundled with a Firefox plugin that, using Mozilla’s Social API, allows you to add a Known share/reply button to your browser.

This is pretty cool, but sadly only works for Firefox.

While other browsers, including Chrome, can use the bookmarklet to access the same functionality, this is rather clunky – for one thing, Chrome’s bookmark bar is hidden by default, for another Chrome has an extensive API and it’d be a shame not to use it!

A Chrome plugin for your site

So, I had a go at putting together a Chrome plugin… partly to scratch this itch, but also to learn how to write Chrome extensions (which turns out to be fabulously easy).

Install and activate the plugin, then go to your settings page to download a chrome extension which has been customised to your site.

Go to your Settings -> Extensions page, and then drag the archive into the list; all being well, you’ll have a new icon next to your address bar!

» Visit the project on Github...

So, here’s a plugin that implements a basic Known to Known cross poster, which uses the Known API authenticated with OAuth2 using my OAuth2 server.

This post will let you link an account on one Known server with an account on another Known server, and allow you to crosspost status and text posts from one to the other.

Primarily this is a demo of OAuth together with the Known API, but it might be handy if you have, say, a corporate blog but still want to post to it from your main site.

Pull it apart, play with the OAuth and see how I talk to the API!

» Visit the project on Github...