rentzsch.com: tales from the red shed

mogenerator v1.5

Code

mogenerator is my little command-line tool that reads in .xcdatamodel Core Data model files and spits out Objective C code following the Generation Gap codegen pattern.

Version 1.5 is out, here’s what’s changed since the last time I wrote about it:

v1.3:

  • Added a --template-path option. This option short-circuits mogenerator’s usual template-file-set search code and forces it to look in (and only in) a specific location for template files.

v1.4 courtesy of Dave Dribin:

  • Added --output-dir option. You no longer are at the mercy of the working directory. Overdue.
  • Added --machine-dir and --human-dir options. Allows easy segregation of files generated for the compiler (machine files) and for the programmer (human files).
  • Beefed up --help output.
  • Internally now uses Dave’s ddcli framework for command line option processing. Briefly: you specify a delegate and it reads the command line options via getopt and populates your delegate via key value coding. Pretty slick.

v1.5:

  • Added --template-group option. This allows an easy way to specify alternate template file sets. For instance you may want to have a template group that’s tailored for a 10.5-only app, which can take advantage of garbage collection and the new ObjC 2 language features.
  • I was intermixing tabs and spaces in machine.m.motemplate. Fixed, credit to Mike Zornek for pointing this out.

Tuesday, July 17, 2007
02:11 PM