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

Already on GitHub? Sign in to your account

replaced optparse with argparse #30

Merged
merged 1 commit into from Mar 9, 2014

Conversation

Projects
None yet
3 participants
Owner

charulagrl commented Mar 9, 2014

issue #29

Owner

charulagrl commented Mar 9, 2014

@pypingou @ralphbean I have gone through several CLI library and found python-cliff would be a better option for summershum project.
it is because
1. Cliff is built on the top of argparse
2. interactive console
3. auto completion
4. command listing
5. different output format like csv, json etc
6. repl support, we can add programming construct in future i.e. loop, condition etc, to remove redundant tasks. For e.g. if we want five messages to get stored in one time

[charul@localhost] summershum
(summershum) --version   (interactive) 
(summershum) list commands -f csv
(summershum) store -loop=5 --id=[messaged id list] (storing 5 message)

I have build a sample cli app using it and its pretty cool. I am waiting for your views on this.

Contributor

ralphbean commented Mar 9, 2014

👍 here. @pypingou?

Contributor

ralphbean commented Mar 9, 2014

On "cliff", it is very nice; I use it for the "pkgwat" tool. However, I think it might be overkill here.
Summershum has only one real command (no subcommands) and only two options. Argparse is more than sufficient.

Contributor

ralphbean commented Mar 9, 2014

Although, store --loop=5 is a pretty neat idea.

Owner

pypingou commented Mar 9, 2014

👍 for me as well on the pr

cliff is nice but I also think it's overkill/over-engineering for summershum-cli, we should be able to add the --loop option w/o cliff :)

Contributor

ralphbean commented Mar 9, 2014

Thanks for the patch, @charulagrl!

ralphbean added a commit that referenced this pull request Mar 9, 2014

Merge pull request #30 from charulagrl/develop
replaced optparse with argparse

@ralphbean ralphbean merged commit 4e893d5 into fedora-infra:develop Mar 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment