A month on the command line, Day 7: Movable Type from the command line

| | Comments (1) |

DBR commented on my Blogging without a GUI post and told me about mtsend.py - A Command Line Tool for Movable Type.

Here's a description of what it does:

mtsend.py is a command line tool that utilise Movable Type’s XML-RPC interface. It allows its users to edit/post/view/list post entries on a Movable Type site. It takes input from the standard input, and sends output to the stdout, just like all the other well-behaved command line applications. It uses a file format similar to Movable Type’s import export format.
Updated: It appears that mtsend.py also works with WordPress, as WordPress has implemented a compatible XML-RPC interface. In fact I am using this same script everyday since I switched from MT to WP.

...

With a command line tool that can work with pipes and standard IO, it makes posting much easier for me. I can now write up a blog entry in Vi, save the text file, run it through aspell check, and then direct it to mtsend.py to have it posted to my blog site. All under your favourite Unix shell!

And on this page -- and included with the source code -- is clear information on how to write the configuration file for mtsend.py.

As you may be able to tell from the .py part of the name, the app is written in Python. There's this note: "You need to install 'xmlrpclib' if you are using Python 2.1."

And as an aside, Scott Yang, who wrote the app, uses the w3m text Web browser. I'll have to try that one.

Here's Scott's reasoning behind the development of mtsend.py:

I found myself spending most of my day in the front of text console/command prompt. My typical Windows desktop consists 2 of VIM windows and 2 SSH session to other Linux boxes, and half the website I browse everyday is in the excellent text-mode browser w3m. I don’t like to fire up Mozilla and open up the Movable Type site just to post an blog entry. Moreover, I have very bad spelling problem, and posting through the web interface does not allow me to check my spellings. Of course I can edit my post in a separate editor, run that external file through a spell checker, and then paste the content into the Movable Type’s edit entry page. However, since Movable Type has already exported its interface via XML-RPC, why don’t I just write a simple script to post that text file after I’ve run it through the spell checker? The result becomes mtsend.py.

If I can figure it out, It'll be amazing.

1 Comments

Zed said:

You can also post Movable Type entries from within Emacs with weblogger.el (and browse the web with w3m from within Emacs with emacs-w3m, handy if you want to cut and paste URLs or text to your blog entry.)

Leave a comment

Tech Talk column

Steven Rosenberg's weekly Tech Talk column, which appears Saturdays in the Los Angeles Daily News, is now available on the Daily News Technology page.

About this blog

Comments are back: Comments have returned to Click, but due to the thousands of spam comments clogging up the system each day, commenters must now log in. To comment, either create a Movable Type account when prompted, or create and use a Typekey account. Movable Type, as configured on this blog, allows commenters to create a Movable Type account, verify it via e-mail and then sign in to comment. Other methods of verification are OpenID, Live Journal and Vox.




Steven Rosenberg aims to learn what he does not know. He writes about it here.



About this Entry

This page contains a single entry by Steven Rosenberg published on May 9, 2007 4:11 PM.

A month on the command line, Day 7: CLI Magic from Linux.com was the previous entry in this blog.

Google splashing in Microsoft's pond is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Recent Comments

Zed on A month on the command line, Day 7: Movable Type from the command line: You can also post Movable Type entries from within Emacs with weblogge ...

Powered by Movable Type 4.21-en

Advertisement

Other blogs

About The Run Defense in Inside USC with Scott Wolf
HS FOOT: Taft up 16-0 after three quarters in Daily News High School Spotlight
Halftime: Lakers 50, Suns 44 in Inside the Lakers
Elton Brand saga Part I in Inside the Clippers
Kings vs. Capitals in Inside the Kings