Post to Tumblr from Textmate
I am a big fan of TextMate and use it as a general text editor, for Ruby development, and whatever else I can shove into its interface. And that now includes blogging. Surely there are many ways to achieve the nirvana of posting to Tumblr from TextMate but I did not find one readily available with a quick Google search, so decided to set out and come up with my own solution. It was remarkably simple.
First off, I downloaded the tumblr-rb gem created by Mark Wunsch. That installs a tumblr executable to your path:
gem install tumblr-rb
Then I created a dotfile that contains my tumblr credentials and placed it in my home directory:
$ cat ~/.tumblrlogin
email: notmyreal@address
password: mysecretpassword
With that setup, you can pass a file or a URL to the tumblr command to post to tumblr, or you can even shove data to it from STDIN. It’s flexible like that.
The cool thing is that you can author your blog post in Markdown and include some front-loaded YAML to set up things such as a title, tags, slugs, and so on.
With that in mind, I fired up ye olde Bundles -> Bundle Editor -> Edit Commands and chose the Markdown bundle and added a new command that looks like this:

So it looks like this:
Command: tumblr --credentials ~/.tumblrlogin
Input: Entire Document
Output: Create New Document
Activation: Key Equivalent (Whatever keystroke you want)
Now, I can open a new Markdown document, edit it, and hit my keystroke to have it automatically post to Tumblr! How cool is that? Here’s a very meta example of what my Markdown document looks like:

Now go have fun posting to Tumblr from TextMate!
-
m3talsmith liked this
-
tnypxl reblogged this from timgourley
-
tnypxl liked this
-
innerfusion liked this
-
truemilk liked this
-
leakynoggin liked this
-
matsuda reblogged this from timgourley
-
matsuda liked this
-
fabbrikk liked this
-
fabbrikk reblogged this from timgourley
-
mvaz liked this
-
rene-ernst liked this
-
mike-walter liked this
-
internetabzocke liked this
-
andyattebery liked this
-
owen liked this
-
schapirama liked this
-
adamjtaylor liked this
-
rhazes2119 liked this
-
razorsharp reblogged this from timgourley and added:
Good stuff. This might become...new workflow. There’s nice benefits
-
timgourley posted this