TextMate News

Anything vaguely related to TextMate and macOS.

Widget Creator

Andy Herbert recently announced a Widget Creator bundle (direct link to the bundle). This allows you to create a Dashboard Widget from your current document, be it a Ruby, Python, Perl, shell, or whatever script.

The created widget will then run the script when clicked and you can optionally drag files or URLs to this widget (e.g. from Finder or your web browser), and the script will receive the dropped items as arguments.

There is a screencast showing the Widget Creator bundle in action.

So if you don’t like to write contextual menu plug-ins or compile AppleScripts into applications, in order to get custom (drop) actions in Finder, this bundle provides you with an easy alternative!

categories Bundles

13 Comments

Wow! Finally a use for widgets! This is incredible.

With the announcements of rb-appscript and RubyOSA now this, UI scripting and automation on the Mac has made great strides in the past few weeks. Thanks!

Wow, that’s great!

Now if Textmate would just handle Emacs-style numeric args (the whole Control-U prefix), I could switch from Emacs…

Wow, that’s just plain useful. I’m going to play with this.

26 October 2006

by Helge Hartmann

Unfortunately, the screencast does not appear in the screencast list, that I included in iTunes. It would be nice, if you would add it.

Is there sound on this screencast? I get no sound when I play it in quicktime or VLC.

Helge Hartmann: I generally do not add third party screencasts to the feed, and Andy is already close to having used up his bandwidth for this month.

But he talked about doing a new screencast (showing latest version of the bundle) with audio, and likely that will be hosted in the feed.

retnuh: It is without sound.

27 October 2006

by Dan Kelley

I second Tom’s comment. It’s possible I’ll start using widgets now. To date, they have seemed like a broken screw thrown in a bag of nails – a mistake, and not a very useful one.

Can someone who has this bundle make it available at an alternative download location? I’d really like to get started using it.

I finally got it installed and have quickly created a script that lets you drop images onto the widget and have them scaled down to 800 x 600 (or vice-versa) with the scaled version saved to the users tmp directory. Great for preparing photos for upload to an image gallery. The scaling is done using ImageMagick. I may combine this bundle with the new textmate dialog system and add on the ability to upload these photos to an online photo album.

Oops! Forgot to post the script:

#!/usr/bin/env bash
export MAGICK_HOME=/opt/ImageMagick-6.2.6

for arg in "$@"
do
    #Treat each file dropped on to the widget as "$arg" in this loop
    cp "$arg" ~/tmp
    cd ~/tmp
    /usr/local/bin/mogrify -resize 800x800 "${arg##*/}"
done

It’s impossible to download the bundle from the given internet address ! Maybe this problem can be solved !?

Thomas: The .mac web space where the widget creator bundle is hosted has a monthly download limit of 10GB, which in the past month or so I have managed to exceed. The dowload restriction re-evaluated bi-weekly, so you should be able to download from the webspace at the start or the middle of the month. Allan has also mentioned the possibility of hosting the bundle as part of the central repisitory which I think is a great idea, as well as making the screencast available on the RSS feed, unfortunately the audio quality on the screencast is not great.

Hi.

I read the advice with the download restriction. I tried to download the bundle today. Is the rate already exceeded? Is there a way to get a copy from somewhere else (even by mail)?

Lars.