Friday, June 18, 2010

How to make a quick blogpost to blogger from command line

Quick blogpost: HOWTO.

First install the google api python client

$ pip install google-api-python-client

$ cat - > newblogpost.txt
type in what you have to say
^D

Use pandoc to convert the text bits to html bits

$ pandoc newblogpost.txt -f markdown -t html -o newblogpost.html --no-wrap

Upload the transformed bits to blogger using the Google Command Line tool.

$ google blogger post --title "Hello, world!" newblogpost.html

And you are done!

Followers