Posts tagged "Posterous"

First Post via Posterous

So, how do you build an interface to post content for your selfmade Blog app if you actually don’t really want to?

Easy: You don’t!

I’ve been looking around for inspirations on how to build a interface to put posts on my selfmade website. Thing is though: Input validation is tedious and error prone. Even if i am the only person who will ever use this interface, i’ll still manage to trick myself. Encodings, Character Sets, HTML Editing etc, then i’d like to post Images and Photos and other Media stuff. Building a frontend for that is a tedious task.

So, why bother?

Posterous to the rescue

While looking around i stumbled over tumblr and posterous both providing a blogger like service that:

  • Doesn’t run on Wordpress. I’ve grown old and tired of it.
  • Both have slick looking and quick interfaces.
  • Neither want to know when your mothers, best friends niece had it’s last teeth pulled while signing up.
  • Both allow posting Markdown content via Email, and they both obviously have rich text editors to edit your posts afterwards.

What Posterous also has is the ability to distribute content to various other sites.

That and Posterous didn’t present the site in german to me unlike Tumblr. I know german, sure, but i don’t want to. My browser says “Give me English Please”, so why send me a german page? I absolutely HATE it when sites do that.

My Content is Mine

Posterous has a simple, yet usefull API that allows me to get my Content back and put it on my site. It also has a comments API where i can feed the comments from posterous back into my database. That way everything i create is under my control, and i can do with it as i see fit. If for some reason the site starts to bother me, i can just delete my account. I will keep my content.

Punch line is: I can use Posterous wonderful interface and features to produce and distribute content, and then just pull it back into my Site.

Here’s the Code to it. It lacks importing comments, but that’s not that urgent.

Triggering the importer

Once posted, Posterous sends a mail back to confirm that something went live. Why thank you, I can use that!

A little procmail action:

:0
 * ^From: .*post@posterous.com.*
 {
     :0 c # Trigger an Update
     ! USER=cbeerta PASSWORD=thoughshallnotknow php index.php --import-posterous

     :0 # and store it (for now)
     $DEFAULT
 }

And the post will be added to my page immediatly. Nifty.