Posting to Wordpress using XMLRPC and Textmate
Textmate is by far the most powerful, most extensible, and awesome text editor out there. At times it is hard to believe that you are not using a giant IDE with all the features it supports. When it comes to scripting and even in some cases coding compiled languages you will be hard pressed to find a better option if you use a Mac. I know that for Window users there is E-Text Editor but I am unsure if it is exactly the same for this particular tutorial so I will not reference it after this.
Instead of talking about how Textmate can make your coding life easier I will be talking about how it can make your blogging easier. This post is aimed at Wordpress but this also works with Drupal, or any blogging application that has XMLRPC. If you are like me then, while the Wordpress back-end is nice and the WYSIWYG editor really sweet, you hate to use the WYSIWYG editors and would rather write your own markup. So lets fire up Textmate and get started so you can see how to use your favorite text editor to post to your blog.
The first thing we want to do is setup our blogging bundle for use. So first, click on the gear at the bottom of your Textmate window and select Blogging and click on Setup Blogs.

You should configure your Blog Setup just as it is listed, if you use wordpress then your XMLRPC url will be http://YOURBLOGNAMEHERE.com/xmlrpc.php. Before we go any farther make sure that you have turned on the service in your Wordpress back-end. It is under settings -> writing as of version 2.7.

Now with the Blog Setup out of the way and the service on we are ready to test it out. This may seem like no big deal but lets go ahead and write a new post to test it out. So in Textmate open a new window and either set the file type to Blog — HTML or press Cntl+Option+Shift+B and select it from that menu. I prefer keyboard shortcuts but I’ll wait if you don’t……ok, ready? Lets go ahead and just start typing out our post and marking it up at the same time. Nothing special as you will delete this anyway probably since it is just a test. After you get some fake content in there, and here is the cool part, drag an image into the Textmate window. You will get a dialog screen asking for your login and password, then a name for the image. After the image is uploaded it will plop the img tag with the right attributes right in the post. Pretty amazing, well not really but still pretty cool. So finally lets just publish the post. Press Cntl+Command+P and it will again ask for your username and a title for the post. You will have a browser window open and show you your finished work.
After using it a bit you will really start to appreciate it, there are other options too. I like to use markdown for most simple markup and Textmate supports it in addition to this you also can choose from just text and also from Textile. So give it a try for a week and see if you don’t see yourself logging into your blog less and less. Don’t forget to check out the blogging bundle to see the other options, like fetching posts for editing.