• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Launching plugins from command line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Launching plugins from command line


  • Subject: Launching plugins from command line
  • From: Rick Hoge <email@hidden>
  • Date: Fri, 16 Apr 2004 16:43:24 -0400

Dear group,

I'm trying to rewrite a plugin class I've been using to perform image processing operations interactively on datasets in a document-based app. I need to change it so the same module can be run cleanly in two ways: 1) interactively from within the document-based application and 2) on the command line. I realize AppleScript would be quite natural, but in the short term I need to be able to run these from Unix shell scripts to fit into our workflow (will probably try to support AppleScript too).

My initial implementation of the plugin class (actual processing modules are subclasses of the plugin base class) runs interactively, but will need some significant revision to be run from the command-line. It seems like if one is disciplined about using key-value coding (in the first version I wasn't), then this should be possible. For command-line invocation I'm considering writing a "plugin-launcher" executable that would basically take the name of an arbitrary plugin and a list of key-value pairs on the command line. The shell invocation might look something like

runPlugin spatialFilter -kernal Gaussian -fwhm 3.0 -inputFile myfile.foo -outputFile myoutput.foo

An alternate solution might be to provide an entry point in the plugin base class which allows command-line invocation and automatic setting of instance variables using command-line flags. Not sure whether this is feasible in a loadable bundle though - yet another option could be to subclass plugin base class to provide the command-line functionality.

The other part of my plan is that interactive invocations should be able to save an XML representation of the plugin settings as metadata in the output files or directly to disk so that a user can interactively configure the plugin and then save the settings to run from the command line.

I am wondering if there is any precedent for writing plugin objects that can be configured and run from the command line in this way, or any suggestions or gotcha's that come to mind.

Thanks for any suggestions,

Rick
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Simple question: getting 'locale' dictionary for NSCalendarDate class routine
  • Next by Date: Re: nstableColumn bindings and cells
  • Previous by thread: Re: Simple question: getting 'locale' dictionary for NSCalendarDate class routine
  • Next by thread: Re: Simple question: getting 'locale' dictionary for NSCalendarDate class routine
  • Index(es):
    • Date
    • Thread