updated README.md [ci skip]

This commit is contained in:
mpeterv
2014-01-13 00:02:59 +04:00
parent fe0b5f2874
commit a5a49d13a8

View File

@@ -1,62 +1,25 @@
argparse argparse
========= =========
[![Build Status](https://travis-ci.org/mpeterv/argparse.png?branch=master)](https://travis-ci.org/mpeterv/argparse)
Feature-rich command line parser for Lua inspired by argparse for Python. Feature-rich command line parser for Lua inspired by argparse for Python.
WIP. WIP.
Something already works:
```lua
local argparse = require "argparse"
local parser = argparse.parser()
parser:argument("input", {
args = 2
})
parser:mutually_exclusive(
parser:flag("-q", "--quiet"),
parser:option("-s", "--server")
)
local run = parser:command "run"
run:flag("-f", "--fast")
local args = parser:parse()
```
TODO L1 TODO L1
======= =======
* More tests * Document NYI declarative interface. Choices, converters.
* Add converters * Write tests related to NYI declarative interface.
* Improve error messages: delegate them to parser, have separate methods for each error type * Implement NYI declarative interface.
TODO L2 TODO L2
======= =======
* Add choices * Document parsing.
* Make interface declarative * Write tests related to parsing.
* Refactor Parser * Refactor/rewrite parsing stuff.
* Write primitive ugly usage and help message generation * Current Parser class should be just a container for information used in parsingm such as options, commands, etc. The relation between Parser and ParserState should be reversed; ParserState should be the actual parser; it should process args and query Parser when needed.
* `-` shouldn't be the only character for options/flags. Infer all of them from first characters of option aliases.
TODO L3 * Suggestions for command typos. E.g. `$ luarocks isntall` -> `Did you mean 'install'?`
=======
* Tests with 100% coverage
* Document with LuaDoc/LDoc
* Add examples
* Add suggestions for command errors(e.g. `$ luarocks isntall` -> `Did you mean 'install'?`)
* Add pretty formatted usage and help messages
* Set up travis-ci testing
TODO L4
=======
* Release