I've created ptolemy.moml.MoMLCommandLineApplication, which
takes command line arguments that update the parameters.
See
http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-users/2009-February/001332.html
for further discussion.
I looked at refactoring the code, and it would be a big job. Probably
ptolemy.actor.gui.MoMLApplication should extend a class in ptolemy.moml that
provides the basic infrastructure. The amount of code duplication in
this new class is fairly small. If this was to be avoided, we would want
ptolemy.actor.gui.MoMLApplication to call a utility function. However,
this would increase complexity.
However, there are issues in the devel tree:
1) https://dev.kepler-project.org/developers/reference/executing-kepler-from-the-command-line
was way out of date. There is no kepler.sh or kepler file in my tree.
I added some text at the bottom that describes the current situation.
2) There is discussion at
http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/2009-February/013829.html
about how to run from the command line, but I'm not sure how to pass a command
line argument.
To close this bug, I'd like to be able to invoke a workflow from the command
line and pass it an argument.
Something like:
ant run-workflow-no-gui -Dworkflow=/Users/cxh/ptII/ptolemy/moml/test/MoMLCommandLineApplicationTest.xml -DmyParameter=2
BTW - I really don't like the -Dworkflow= syntax. We should probably
have a kepler script that buries this from the user.