We’ve been in hardcore documentation mode at my day job for the last few weeks. Unfortunately, this means that I’m spending a lot of time in Microsoft Word. (I know I could be using OpenOffice or NeoOffice. I just don’t like working in word processors, in general.) I would much prefer to be working in Vim. Today, the itch got bad enough to require scratching, so I wrote a little Ruby script that converts a Markdown document into a full HTML document. Because the managers are expecting me to produce Word documents, I added a style block so that things can be tweaked to look good in Word.
If you try it out, I’d appreciate feedback.
I’ve added a couple scripts to my new Projects page. Regular readers of this site will probably be familiar with them.
The other day I wrote a program that will produce an RSS feed from a list of URLs. I did this because a few of the pages that I like to read on a daily basis (such as Pitchfork) don’t have feeds. And these days, if a site doesn’t have a feed, I usually don’t remember to read it.
If this is something you’d like to try out, leave a comment and I’ll send you the instructions for setting it up. I’d post it on this site, but it’s way too rough for public use yet.
Also, if you know of a program or service that already does this, please let me know. I’d hate to waste my time replicating someone else’s work.
I’m working on a little project that requires that a Ruby program automatically runs once each day. In OS X Tiger, cron has been depricated in favor of launchd. I’ve tried setting it up on my own without success. Are you familiar with launchd?
spotlight.rb is a small Ruby program that I threw together a few weeks ago. It allows you to perform Spotlight searches and launch items returned by those searches from the command line. I’m not sure if it will actually be useful to anyone. I just thought it would be fun to make.
If you’d like to try it out:
- Make sure you’re running Mac OS X 10.4
- Download the program
- Unzip the archive
- Open a terminal window and change the directory to the location of the program
- Type
ruby spotlight.rb
The program understands the following commands:
s or search: Searches Spotlight for the string following the command. For example, s opml.
f or forward: Displays the next twenty results of the search.
b or back: Displays the previous twenty results of the search.
q or quit: Ends the program.
- To launch one of the results of the search, simply type the number of the result.
If you find spotlight.rb useful and would like to see it developed further, let me know. Please keep in mind that this is only my second Ruby script.