More adventures in Ruby. With lots of help from folks on the Ruby Forum and others I got my basic photo renaming, geocoding, and create a jpg for each movie (for import into Aperture Ruby script working.
But I have several file locations and files to select as well as numerous options which requires manually editing the script. This is fine while creating the script, but not good for continued use. So a GUI is needed. My limited experience (OK one program) with AppleScript Xcode sent me down that path. But RubyCocoa isn’t as complete as for AppleScript. Appears I would need some Cocoa which to me looks like another language. Also tempting to wait for Leopard to see if Ruby is better supported. But I want this to work now and when Leopard comes out, I’ll be unable to work on it until next year. Didn’t want to wait six months to pick this back up again.
Then searching on Ruby GUI brought up numerous platform independent GUIs. Since Ruby fits this description I quickly looked at these, both the websites and discussion groups (via Google). On the list in no particular order are Ruby Tk, wxRuby, Qt, FXRuby, Gtk+. The discussion group and blog commented are the usual “best thing since (take your choice” to “who would ever use this app?” and “is this still supported?” I tried to install some of them. Should I use the binary, or Fink, or gem or? You newbies understand the problem.” Confusion. Plus dependencies. And is it getting installed with the 1.8.2 version that comes with Tiger or the 1.8.6 version that I installed How?. Reinstalling dependencies, gems, binaries to try to get errors to please go away, I want to try this solution. Some I could install, some I couldn’t. Some looked like Windows. And none “easy” to use. In the end, since I wanted a Mac usable solution, I abandoned this path.
Back to Mac: Platypus and CocoaDialog came into my consciousness. Took me a bit to figure out all Platypus did was put and application wrapper around the script. Not fair to say “all” as that will prove useful. But I assumed it would do more–my fault not the program. Then CocoaDialog. Produces one line dialog boxes. But I wanted more.
Pashua reappeared via this tutorial for Perl. I had dabbled with this for my AppleScript app years ago. But since XCode handled it well and I wanted to try XCode I didn’t use it. Although seemingly little known, Pashua has been around a while, still being developed, well documented, and the developer responds quickly to queries. And the developer has provided sample Ruby scripts and a file which links Ruby to the Perl program; this was enough to get me to dive in.
What I ended up with: