29 11 / 2011

Textmate to Tumblr

I went looking for a way to post to Tumblr via the command line the other day, and I was very interested in M. Wunsch’s post. He has created a Ruby gem which elegantly speaks to the Tumblr API and creates posts with attributes specified in a YAML front matter, a la Jekyll. This is brilliant, and wonderful. A really good idea sparks other ideas, and this one sent lightbulbs off in my head. I could use this to create a script that would automatically post to Tumblr, or even better I could use the still fabulous Textmate to make a bundle that would make my blogging just a few button presses away. Seems wonderful.

Now a few brief words on why anyone would ever want to go to this trouble. Isn’t there a nice little text box on the Tumblr post screen that would do this for me?

I could just enter my posts that way, and hey, I can even write them in Markdown! Off the top of my head, here is why I would want to do this.

  • Have a copy of every post I ever made in an easily readable, renderable format
  • Luxury of writing in my favorite text editor
  • No suffering from closed tab syndrome (ask my wife, who posts from a Wordpress entry form)
  • Able to write posts even when Tumblr is down (hey it has had more uptime than me recently)

Some of these need no explanation. I cannot emphasize enough how nice it is to have the ability to compose in my own editor, with its over abundance of tricks and hacks that I have built up. So, on to the how-to.

This is taking place on a Mac. Primarily because that is where you can use Textmate. Now the first part would be equally viable on any Linux Ruby install. Install the gem:

sudo gem install tumblr-rb

That builds it out and installs the tumblr executable. You can check the extensive documentation on how this CLI tool works on M. Wunsch’s excellent github page. The flexibility of the tool is truly excellent. Many modes are supported. However, it is fairly simple to use to setup a Textmate bundle. First create a file in your home directory to store your Tumblr credentials.

mate ~/.tumblrcreds

Enter your username and password as such

username: YOURuserNAME
password: myCRAZYAWESOMEsecurePASS

Please substitute your own combination. And email me if that really is your password cause that is epic. Do not tell me to what it is your password. Now in Textmate open up your bundle editor, available in Bundles -> Bundle Editor -> Show Bundle Editor. Create a new bundle using the plus sign at the bottom. Use these settings as a guide.

If this is done correctly, it will take the entire document and feed it into the tumblr command line utility. The command line utility, using the file we created earlier for reference, posts your document to Tumblr. If there is any feedback, it will provide it to you in a fresh document in Textmate. Now you are just a key combination away from a fast Tumblr post. It even supports queued posts with specified publish times, if you are one of those real bloggers that has several posts in the queue ready to go.

Let me know how it works for you!

29 11 / 2011

Mike from Techdirt nails SOPA to the wall. SOPA has been getting more and more bad press lately, probably why copyright monopolies were trying to ram it through legislation before anyone could protest. I am hoping at this point it dies, even big companies are coming out against it.

Tags:

Permalink 3 notes

28 11 / 2011

Writing Again

I plan on a triumphant return to the land of blogging sometime soon, I know that people are desperate for my input on matters technical or otherwise. What I am planning is to get somethings together that make it easy to post, remove some of the friction, so to speak, so that I have a little more flexibility. This particular post is written in Elements, the dropbox text editor for iPad that can magically make markdown formatted text into tumblr posts. This is one option I am pursuing. The other option is to get things working with Textmate so that I can simply use a Textmate bundle to post markdown with some YAML front matter to the blog, which, combined with Brett Terpstra’s blogsmith bundle and some interesting textexpander snippets, would make blogging a breeze.

Tags:

Permalink 3 notes

05 9 / 2011

So, I certainly do not remember this being here pre-Lion. Apparently there is a utility that can put your wireless card into promiscuous mode just that easily. By telling it to capture raw frames you can capture all the network traffic around you. Then it will spit out a zipped pcap file wherever you would like, to use whatever command line tools you might want to on it. I certainly aliased this little utility into my applications folder. It is found by default in all Lion computers in /System/Library/Core Services/Wi-fi Diagnostics.

So, I certainly do not remember this being here pre-Lion. Apparently there is a utility that can put your wireless card into promiscuous mode just that easily. By telling it to capture raw frames you can capture all the network traffic around you. Then it will spit out a zipped pcap file wherever you would like, to use whatever command line tools you might want to on it. I certainly aliased this little utility into my applications folder. It is found by default in all Lion computers in /System/Library/Core Services/Wi-fi Diagnostics.

Tags:

Permalink 5 notes

03 8 / 2011

Not Like you Like

Launchbar 5, when invoked from a fullscreen Lion-ified application, rips you out of the custom space and drops you on another desktop. Unfortunate behavior, that. You find anything strange after your upgrade?

05 4 / 2011

I love my iPad sleeve from here, still works on the iPad 2. But their custom built iPad 2 case is certainly drool worthy.

Tags:

Permalink

05 4 / 2011

I certainly enjoyed this as a read, knowing what signals you are sending to a potential employer with your degree is a valuable skill, and one worth knowing.

04 12 / 2010

remiel:

It used to take 28 seconds for my 13-inch MacBook Pro to load the folders on my desktop after I logged in. Now it takes five seconds.

Large-footprint apps like Photoshop and Dreamweaver now load near-instantly.

The machine now has 1.16 terabytes (1,160 gigabytes) of hard drive space, 160 gigs of…

Permalink 56 notes

29 11 / 2010


  Textual is a lightweight IRC client designed specifically for Mac OS X. It was designed with simplicity in mind.

Textual is a lightweight IRC client designed specifically for Mac OS X. It was designed with simplicity in mind.

(Source: onethingwell)

Permalink 20 notes

15 10 / 2010

And available for free for students