Monday, June 25, 2012

Googlecl, what the f*ck is it?

I was going crazy trying to workout a way to upload data into the my blogger account. Sure, I could just write a post via the post option within blogger, but I want to do this in an automatic manner.


My first was to sent an email via the command line to blogger. The problem is that while it sort of work, I came across the problem that the post is uploaded and marked as a draft version. So I still need to login and publish it. Another problem is that my posts have pictures in them. I am unable to embedded a picture in the email that I am sending via the command line.


The second attempt is to access the Blogger API directly. However, during my research in the Blogger API, I came across googlecl


googlecl is Google's answer to accessing data to their services. Their services includes Blogger, Picasa, Docs and many more.


googlecl is also able to upload a file. So if that file is a html file, it would be rendered quite nicely by blogger.


The commandline is


google blogger post --src [filename.html] --title "a title" --tags "awesome"


The article has some hints if googlecl docs are too confusing.

No comments: