mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
d7ba1177af435b181965abca5df67aa00f4a4d10
largparse
Feature-rich command line parser for Lua inspired by argparse for Python.
WIP.
Something already works:
local largparse = require "largparse"
local parser = largparse.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
- More tests
- Add converters
- Improve error messages: delegate them to parser, have separate methods for each error type
TODO L2
- Add choices
- Make interface declarative
- Refactor Parser
- Write primitive ugly usage and help message generation
TODO L3
- 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
Languages
Lua
94.7%
Python
5.3%