HTMLTemplate converts (X)HTML templates into simple object models controlled by callback functions defined in your Python code. Conceptually similar to DOM (but much simpler), it provides complete separation between HTML markup and presentation logic. It boasts an excellent power-to-weight ratio thanks to its lightweight DOM-inspired design: the implementation and API are extremely simple and compact, yet powerful, flexible, and easy to modify and/or use.
Ruby appscript (rb-appscript) is a high-level, user-friendly Apple event bridge that allows you to control scriptable MacOS X applications using ordinary Ruby scripts. It is a port of the powerful, mature Python appscript package, making Ruby a serious alternative to Apple's own AppleScript language for automating your Mac.