Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Tuesday, January 09, 2007

Adding summary/full article to a blogspot

Saw this on a blogspot blog and thought I should do it as well :-)

Looked up Blogger Help - and there seemed to be two mechanisims.
Then there is the 'Classic' vs. 'widget' (? - anyway the _new_ format).

Banged on the format, couldn't find the 'style' tags they talk about.
Couldn't see where to modify the 'post template' they refer to.
Couldn't see where to add the 'span type=fulldisplay' tags either.

Didn't break the CSS :-)

Now, where do I go??

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]