Wednesday, June 21, 2006

Blogging interfaces

Google/Blogger have good doco on-line:
http://code.blogger.com/archives/atom-docs.html

And there are PERL modules on CPAN.

O'Reilly has a discourse: http://www.xml.com/pub/a/2003/10/15/dive.html
[and many others]

I'd like to find some free application to edit the XML or post the blog locally.
O'Reilly have a thing that publishes to "iDisk" on .MAC - not blogger and atom.



Here's some command line posting stuff. Uses "curl".

What BLOGS do I have?
Auth='stevej_098:password'
curl -u "$Auth" -o blog.1 https://www.blogger.com/atom

Which will give for each blog:
<link href="https://www.blogger.com/atom/29583699" rel="service.post" title="stevej-in-oz" type="application/atom+xml"/>
<link href="https://www.blogger.com/atom/29583699" rel="service.feed" title="stevej-in-oz" type="application/atom+xml"/>
<link href="http://stevej-in-oz.blogspot.com" rel="alternate" title="stevej-in-oz" type="text/html"/>


Download a blog
Get the "service.post" tag.
curl -u "$Auth" -o blog.2 https://www.blogger.com/atom/29583699

Post an entry
The hard bit here is the formating of the XML..

curl -u "$Auth" -o blog.4 -H "Content-type: application/xml" -d @blog-post.1 https://www.blogger.com/atom/29583699

some useful searches
grep service.feed blog.1
grep service.edit blog.1
grep service.post blog.[12]
grep service.delete blog.[12]

No comments: