Posterous has a really neat feature of their API docs - you can use it directly
from the web page. Unfortunately, I only need it to migrate off to Octopress.
Log into Posterous and then open the API page. Use the first entry to
obtain your API token. Put this, your login and password below and you should
be able to obtain a list of your Posterous Sites, or Spaces as they’re now
called.
retrieve your posterous site id
12345678910111213141516171819202122232425
$ curl --silent -vX GET --user you@domain.com:passwd \ -d "api_token=your_API_token" http://posterous.com/api/2/sites
* Connected to posterous.com (184.106.20.99) port 80 (#0)* Server auth using Basic with user 'you@domain.com'> GET /api/2/sites HTTP/1.1
> Authorization: Basic BEEFDEADXNlLm5ldC5uejp3dWJ3dWI=> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 \ OpenSSL/0.9.8r zlib/1.2.5
> Host: posterous.com
> Accept: */*
> Content-Length: 42
> Content-Type: application/x-www-form-urlencoded
>
}[data not shown]< HTTP/1.1 200 OK
< Server: nginx/0.7.65
< Date: Tue, 13 Dec 2011 00:49:49 GMT
< Content-Type: application/json; charset=utf-8
< Connection: close
< Status: 200 OK
< X-RateLimit-Limit: 1000000
<
{[data not shown]* Closing connection #0
Lovely. Now that will also provide you with some output, deep inside
that is a site_id field - your site. I’ve conveniently relabelled
this one as 1234567:
Take that site_id and bung it into this curly command, and stash your
posterous content to a file. Note how I use the pages=2 parameter
to retrieve the subsequent page.