Big Cat Scripts Plugin

· technology ·

I've been a long time user of Ranchero Software's NetNewsWire Lite, so I'm a little surprised that I haven't cottoned on to Big Cat Scripts Plugin before now. I've been reading up a bit on Applescript, and saw Big Cat mentioned as an alternative way to launch scripts in a contextual menu. This seems to have a couple of advantages over Apple's Script Menu which appear on the Menu Bar:

All you need to do is to write Applescripts (or shell scripts) and put them into either the 'Files' folder or the 'Text' folder in "~/Library/Application Support/Big Cat Scripts/". The mention of shell scripts intrigued me. It didn't mention Perl specifically, but I guessed that it should work with any of the scripting languages natively supported by MacOS X, so I decided to give it a try. The other shell script examples seemed to pass the selected files/text as command line arguments, so I knocked up the following little script in Perl:

foreach (@ARGV) {
    exec `chmod +x $_`;

I was so chuffed when it worked. It takes each of the selected files and makes them executable. Yes, I know that I could do that in the terminal. Yes, I know that most of this Perl script isn't Perl. Yes, I know it will fail horribly in all sorts of circumstances. But it's all mine. It's quick and dirty, and much easier than navigating to the paths of my Perl scripts and making them executable by hand. I've got big plans for a lot more of these little snippets, as well as brushing up the MakeExec example above to test whether it's operating on a text file and other niceties. I know what I'm going to be doing for the rest of the weekend...

Update: I'm such an idiot that I forgot I had read all about Big Cat less than two months ago on Pete's weblog--this is a sign of senility, for sure. So there should have been a [via Pete's weblog] at the bottom of this entry. Though he is currently at a Typepad blog here. OK, I'll shut up now.