« Lourtier, Switzerland | Main | Like Jewels »

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 TextMate.app/Contents/SharedSupport/Bundles/Blogging.tmbundle. 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' ? '' : Time.now.strftime('%F_')

to

prefix = mode == 'wp' ? '' : 'photos/'+Time.now.strftime('%Y/%m/%d/')

(or whatever you prefer).

Instead of files appearing at http://www.site.com/blog/2007-08-04_name.jpg, they will appear in http://www.site.com/blog/photos/2007/08/04/name.jpg.

(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.)

Comments

Great post

One of the evils with cross-weight is that it will vary the handling balance from a left to a right turn. This can make maneuvering in traffic difficult, even perilous.

This is my first time i visit here. I found many interesting stuffs in your posts. Well-done!

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. Motorcycle Helmets

We are so afraid of failing yet again. And we compare ourselves to an extreme ideal of perfection. We should be able to manage our weigh-especially now that we've had the surgery....

I really thankful to you for this great read!! You did a very great job, keep it up.Funny Quotes

wrtzocjk

This is my original occasion i appointment at this juncture. I create a lot of christmas messages attractive substance in your posts. Thanks for this info!

To see information just about this good post, the students buy pre written essays and custom essays at the custom writing services. Lots of papers writing services furnish the essay writing just about this post.

Its the first time I heard about this Textmate. Well its just like blogger apps from Android I think? Have you tried blogger apps instead?

Dorothy
Kindly visit my blog, please cliquez ici.

textmate?? wow, never heard about this stuff. sounds interesting, looks like I need to try it out. thanks

This is good post, the students buy pre written essays and custom essays at the custom writing services.auto repair brampton || mississauga condos for sale

One of the ills with irritable load is that it will contrast the behavior poise as of a left to a right turn.

Some dissertation writing services are presently searching for the superior knowledge connected with this good post for the thesis report completing.

That's on the agenda got tomorrow if I haven't ruined the DPFE already.I was wondering what the (pd) meant after there code. Nevers that on my code reader before pending.

This is a lovely website.....very fruit and knowledgable

prom dresses london Rachael beam apologizes when considering whacking 'Dancing' manufacturer

What do you mean blogging with textmate?

Our ASP Development company gives enormous value to all the customers by the means of involving high quality process.

Get the most popular dvds Australia and TV shows on DVD onlineļ¼

I've heard one of my friend use textmate for his blog, but I am not really sure if it worked better than wordpress. Honestly I am a wordpress fan. Though I am not giving a thumbs down for textmate, I just happen to have no experience of using it. :)

I've heard one of my friend use textmate for his blog, but I am not really sure if it worked better than wordpress. Honestly I am a wordpress fan. Though I am not giving a thumbs down for textmate, I just happen to have no experience of using it. :)

We can work hard creating course papers. However, we have got a chance to buy coursework and relieve our writing stress.

Regarding TextPattern, how do I tell which blog (or section in TextPattern terms) TextMate should use? I only have one URL for the rpc server. It seems that the bundle assumes that a rpc-server only deals with one blog at the time.
Thanks!

However, we have got a chance to buy coursework and relieve our writing stress.

Really your post is very good and I appreciate it.Accademic Assignment

I used to be able to find good information from your blog articles.

Post a comment