August 04, 2007

Blogging with TextMate

So I tried writing and posting the past few entries using TextMate's blogging bundle. It's cool. You can write and post directly to your compatible blog from within TextMate. Dragging and dropping an image into the file you're editing will automatically upload it to the server and insert the correct markup into your post.

However, under Movable Type images are automatically uploaded into the "site root" directory specified under "Settings", and I wasn't so into the idea of having zillions of images dumped into one folder and mixed with all the index files.

So I modified the blogging bundle so that it will upload into a dynamic directory based on the date. There may be an easier solution that I didn't find.

Find the blogging bundle at Open it in TextMate and look for Blogging.tmbundle->Support->lib->blogging.rb. In the function upload_name_for_path, change the line:

prefix = mode == 'wp' ? '' :'%F_')


prefix = mode == 'wp' ? '' : 'photos/''%Y/%m/%d/')

(or whatever you prefer).

Instead of files appearing at, they will appear in

(Now, of course, I just have to figure out how to auto-rotate the images based on the exif data. The utility jhead should do this, but I haven't worked out how to pass everything through Automator.)

November 01, 2005

Also, broken.

I killed my blog.

Will fix later. Maybe.


(Ignore the 500 error while commenting. Your comment should still show up.)