This is a set of client programs for interacting with the blogger service
You'll need a working python
I write this against 2.5.1 in bichued it's been turned into a contrib so I haven't tested it can can't post installation instructions.
Once you have python you will need Google's gdata client libs
http://code.google.com/p/gdata-python-client/
posts are formatted thus :
-----------
Title: the blog title
Tags: tags, for, the blog,
Draft: yes
body of the post
-----------
You'll need an entry in factotum like this :
quad% [email protected] #your google account
quad% auth/factotum -g 'proto=pass server=www.google.com user='$g' !password?'
!Adding key: proto=pass server=www.google.com [email protected]
password:
!
%
The program getuserpasswd.c is used for that, it does not prompt for missing keys
username is the entry for user in factotum
to get a list of blog_ids run blogger/blogs $username
from then on you need to supply the appropriate blog_id
list posts
blogger/posts $username $blog_id
manage specific posts
blogger/read $username $blog_id $post_id > post
blogger/update $username $blog_id $post_id < post
and for new posts
blogger/new $username $blog_id < post
The actionfs script is for using my actionfs,c which uses a stub FS for prototyping, in this case in enables using blogger with Acme but there are some bugs in actionfs and it sometime suicides. Its use is not mandatory. But if you want to use it, blogger/actionfs $username $blog_id, acme /n/blogger/posts, click on the IDs and they will open for you to edit, Put saves, write to /n/blogger/new for a new post, but watch out for fun :>
EXAMPLES
Set up your blogger accoutn with factotum
% [email protected]
% auth/factotum -g 'proto=pass server=www.google.com user='$g' !password?'
!Adding key: proto=pass server=www.google.com [email protected]
password:
!
# USING THE SHELL SCRIPTS
% blogger/blogs $g
3062883415508658133 compjootery
7387338365422478064 kookookery
% bid=3062883415508658133
% posts $g $bid
3931523848251033590 Date demo
% read $g $bid 3931523848251033590
Title: Date demo
Tags: blogger, demo
Tue Aug 18 20:40:24 GMT 2009
% { echo 'Title: Date demo'; echo 'Tags: demo, blogger' ; date} | blogger/update $g $bid 3931523848251033590
% blogger/read $g $bid 3931523848251033590
Title: Date demo
Tags: blogger
Tue Aug 18 20:45:02 GMT 2009
quad%
# USING ACTIONFS
% blogger/blogs $g
3062883415508658133 compjootery
% blogger/actionfs $g 3062883415508658133
% { echo 'Title: Date demo'; echo 'Tags: demo, blogger' ; date} > /n/blogger/new
% cat /n/blogger/posts
3931523848251033590 Date demo
% cat /n/blogger/3931523848251033590
Title: Date demo
Tags: blogger, demo
Tue Aug 18 21:01:07 GMT 2009
% { echo 'Title: Date demo'; echo 'Tags: demo, blogger' ; date} > /n/blogger/3931523848251033590
% cat /n/blogger/3931523848251033590
Title: Date demo
Tags: blogger, demo
Tue Aug 18 21:01:25 GMT 2009
%
BUGS
Posts need a Title: and a Tags: , should just require Title:
actionfs sometimes suicides (based on stat I think)
only the most recent posts are listed for posts, need to add query
|