More TextMate and Blogging
Note: This post is over 2 years old. You may want to check later in this blog to see if there is new information.
The following links are auto-generated but may help you locate newer content:
This is an update on my adventures in blogging from TextMate. I use Wordpress, and some of this post is very specific to Wordpress, but most of what I have to share will work for other blogging software.
Common Problems
First, I’ll address a problem in the hopes that it will help somebody out. Some people using Wordpress on certain hosts are getting a 406 error when they attempt to set up their xmlrpc.php with an external editor. A fix is here, and it seems to work for most people. Basically, you’re just adding a little snippet to your .htaccess:
<Files xmlrpc.php>
SecFilterInheritance Off
</Files>
The other major problem with Wordpress and TextMate, the “Wrong Size” error, is addressed in my earlier post: Advanced Tools for Wordpress, Part 1. If anyone has a better solution for this Wordpress bug, please let me know!
Now, for some FREE DOWNLOADS!
My Contributions
I’ve been blogging with TextMate and Wordpress for a while now. What I’m really enjoying is the ability to write commands that do anything I want. I’m making 2 “packages” available, now that they’ve gone through a few revisions.
Linking Bundle
The first is a Linking bundle, including my new and improved Wikipedia linking command. It allows you to highlight text, search Wikipedia and automatically generate a link to an article, with title attributes. It parses an exported version of the article and follows redirects and disambiguation links. If it detects multiple links, it provides a drop down menu so you can define the context of the linked word(s). It was suggested that I use the API, but I had a little trouble getting anything useful out of the API for my purposes. I did use the Special:Export to ease the scraping a little. A basic version of the Wikipedia command is included that does none of the additional scraping/parsing. Just for reference.
The bundle also includes an enhanced Google “lucky linking” command. Really, the biggest addition is that it opens the linked page and pulls out a title automatically, inserting it as a title attribute in the link. There is also a new version of the “Get Title of URL” command.
Fetch Categories
Second, I’m making available a (hopefully) final version of the Fetch Categories command I’ve been working on. It allows you to type cat and hit tab, at which point it will contact your blog and retrieve the available categories. It presents the categories in a multi-select menu, thanks to some AppleScript, and once you’ve made your selection it inserts the chosen categories as headers in your current post. I find this a lot easier to use than trying to remember my categories and their spelling.
Furthermore
Other items I’m working on:
Automatic thumbnailing and linking of images dropped into a blog entry.
An abbreviation snippet that takes the selected text and gives it back to you in an input box, allowing you to remove the unnecessary portion of the text and return the abbreviation, at which point it will create an abbr tag and title attribute.
An acronym command that pulls the first letters of the selected text, capitalizes them and replaces the text with the acronym created, using the original text as the title attribute of the acronym tag. I know you don’t need the acronym tag and should just use the abbr tag, but it was fun to write.
Improved snippets for the HTML package. I’ve taken things like the div command and had it insert both class and id attributes, allowing for deletion of one or both using tab stops.
And lastly, I’m working very hard to come up with a way to allow access to Ultimate Tag Warrior and my Autotag Mod so that I can post directly to the blog without having to use the online editor to add my tags. It’s not a big deal to set TextMate up to automatically open the current post in the editor, add the tags and then publish (I set all of my TextMate posts to Status: Draft), but the geek in me really wants to consolidate things. 
blogging» geek» textmate» wikipedia» wordpress»
Comments are closed
Comments are currently closed on this entry.