Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update command line argument handling to use Commons CLI #12

Open
2 tasks
pgleeson opened this issue Apr 29, 2014 · 0 comments
Open
2 tasks

Update command line argument handling to use Commons CLI #12

pgleeson opened this issue Apr 29, 2014 · 0 comments

Comments

@pgleeson
Copy link
Member

Instead of manually parsing options (https://github.com/NeuroML/jNeuroML/blob/master/src/main/java/org/neuroml/JNeuroML.java#L162) use a standard package to parse arguments, e.g. Apache Commons CLI:
http://commons.apache.org/proper/commons-cli/

Additionally:

  • Test all options in travis script
  • Add global option for location of generated files
@pgleeson pgleeson changed the title Update command line argument handling to use Commons CLI The Apache Commons CLI library provides an API for parsing command line options passed to programs. It's also able to print help messages detailing the options available for a command line tool. Commons CLI supports different types of options: POSIX like options (ie. tar -zxvf foo.tar.gz) GNU like long options (ie. du --human-readable --max-depth=1) Java like properties (ie. java -Djava.awt.headless=true -Djava.net.useSystemProxies=true Foo) Short options with value attached (ie. gcc -O2 foo.c) long options with single hyphen (ie. ant -projecthelp) A typical help message displayed by Commons CLI looks like this: usage: ls -A,--almost-all do not list implied . and .. -a,--all do not hide entries starting with . -B,--ignore-backups do not list implied entried ending with ~ -b,--escape print octal escapes for nongraphic characters --block-size <SIZE> use SIZE-byte blocks -c Update command line argument handling to use Commons CLI Apr 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant