Well that's a start, at least it goes one direction. I wonder if I could find what I'm looking for in some scripting language cookbook.