View Single Post
Thought I'd share some of my recent fun scripting OO3 and OO4, now that I've updated things to work with OO4.

I've got an outline that I use to keep track of all my gaming miniatures. I keep track of the SKU, the number, whether or not I've painted them.

Scripting has come to my rescue in two big ways. First, I wanted to get some stats on my inventory. So I wrote some applescript which walked the outline and added things up based on which checkboxes I had checked. Awesome!

Unfortunately, Applescript wasn't the fastest way and it took almost 20s to run. So I just rewrote it using Ruby to parse the xml in the .oo3 bundle. Now it's instantaneous! (Well, 0.2s, which is close enough for me.) So, thanks for using XML instead of a proprietary format in there!

Another thing I do... Reaper Mini has a great online catalog with tags and pictures . So I wrote a Ruby script using AppleScript's ScriptingBridge. It goes over all the selected rows, sucks out the SKU at the front of the line, then uses Ruby to screenscrape the site and pull out canonical name and tags, then replaces the topic and adds the tags as a note. Now that OO4 has scripting support for attachments I'm going to add the picture as well.

So, thanks!