1. Juri Pakaste
  2. xibgraph

Wiki

Clone wiki

xibgraph / Home

xibgraph

About

xibgraph helps you look at the connections inside an Interface Builder XIB file. It supports outputting binding, action and outlet connection information.

Here is an image that has been generated by outputting all connections from a Cocoa XIB file:

Example graph

Version History

  • 1.1: 2010-07-08
    • Output file command line argument
    • Check input file existence
  • 1.0: 2010-07-08
    • First released version.

Usage

You can run the xibgraph script from the download directory or you can install it with setup.py:

python ./setup.py install

xibgraph supports three output formats at the moment: JSON (default), plain text with Python objects or Graphviz DOT format.

The output format and the connections types are selected with command line options:

xibgraph --bindings --text xibfile
xibgraph --actions --dot xibfile
xibgraph --outlets --actions --json xibfile

The DOT output uses HTML by default, but at least OmniGraffle has trouble with it. You can specify --no-dot-html to avoid it.

For all command line options, use:

xibgraph --help

xibgraph can also be used as a Python library.

A Note About Names

xibgraph doesn't do graphical representations of objects inside XIBs. To get names better than "Unnamed 3" for your objects, you should set Interface Builder Identity / Name for your objects in the Identity Inspector of Interface Builder. It makes IB nicer to use, too.

Requirements

xibgraph requires PyObjC. JSON and text output work with the Python shipped with OS X 10.6 (Snow Leopard) without any additional requirements.

To output DOT, pydot is required. You can install it with pip (pip install pydot) or easy_install (easy_install pydot).

Licensing

xibgraph is MIT licensed. See COPYING for details.

Author

xibgraph was written by Juri Pakaste <juri@iki.fi>. It's on the web at http://bitbucket.org/juri/xibgraph.

Updated