Tokyotribeca

10,863 kilometres between Tokyo and Tribeca

Blogging from Command Line

leave a comment »

For anyone interested in trying out blogging from the command line, I recommend blogpost.py, a python script by Stuart Rackham, which lets you create, update, list and delete posts for your WordPress blog from command line.

It’s super easy to install and configure. The instructions are here, although you’ll need to install Mercurial, a code repository manager, first to grab the code. The full manual for blogpost is here, and it took all of five minutes to grab, install, configure and start using.

Once you’ve got it working, you can write a function in your .bash_profile to make it easier to pass parameters to blogpost like this:

function blog(){
~/blogpost/blogpost.py post “$1” -d html -t “$2” -c “$3”;
}

(Sample usage: blog samplepost.html “Title of blogpost” sample_category)

Or you can use this shell script by Raam Dev

And if you’re using Blogger instead, try GoogleCL, a bunch of command line tools for Google APIs, including Blogger. Very nice!

Advertisements

Written by tokyotribe

June 5, 2011 at 4:32 am

Posted in Tech

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: