18 Mar 2008, 12:42pm
/dev/random
by

4 comments

Ruby: mysql2omnigraffle

I’ve finally put mysql2omnigraffle up on RubyForge. It’s a Ruby script to visually represent the structure and relationships of MySQL tables in OmniGraffle and at the moment it is very much in development.

If you look at the code you’ll see that it contains methods for handling OmniGraffle communication using both RubyOSA and appscript. That’s because they both seem to have their own strengths and weaknesses and I can’t yet tell which is more suited for this task. Until that time, parallel development with both.

Usage

Call the script with the following options:

~/: ruby mysql2omnigraffle.rb -t db_table_name -h db_host -u db_username -p db_password

Current status

  • Reads tables from a MySQL database.
  • Creates shape objects in OmniGraffle for tables and columns.
  • Displays the tables in a linear format down the OmniGraffle canvas.

Needed

  • Grouping within OmniGraffle to group table header shapes and table column shapes together.
  • Foreign key relationships indicated between tables in some way.
  • A better layout process within the OmniGraffle canvas.
  • Command-line parameters to define database, uname, pword, etc.
  • Remove OmniGraffle 4 hard-coding, get working with OmniGraffle 5.
  • Everything else?

If you’re interested in helping out and relish the opportunity to delve into the guts of raw OmniGraffle apple events, please do get in touch.