mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
add TODO
This commit is contained in:
63
README.md
63
README.md
@@ -1,4 +1,65 @@
|
||||
largparse
|
||||
=========
|
||||
|
||||
Feature-rich command line parser for Lua
|
||||
Feature-rich command line parser for Lua inspired by argparse for Python.
|
||||
|
||||
WIP.
|
||||
|
||||
Something already works:
|
||||
|
||||
```lua
|
||||
|
||||
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
|
||||
=======
|
||||
|
||||
* Fix strange messages for not passed arguments
|
||||
* Improve error messages: delegate them to parser, have separate methods for each error type
|
||||
* Tests
|
||||
|
||||
TODO L2
|
||||
=======
|
||||
|
||||
* More tests
|
||||
* Add defaults
|
||||
* Add converters
|
||||
* Add choices
|
||||
* Make interface decalrative
|
||||
* 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
|
||||
|
||||
|
@@ -1,22 +0,0 @@
|
||||
package = "largparse"
|
||||
version = "git-1"
|
||||
source = {
|
||||
url = "src"
|
||||
}
|
||||
description = {
|
||||
summary = "*** please specify description summary ***",
|
||||
detailed = "*** please enter a detailed description ***",
|
||||
homepage = "*** please enter a project homepage ***",
|
||||
license = "MIT/X11"
|
||||
}
|
||||
dependencies = {
|
||||
"lua >= 5.1, < 5.3",
|
||||
"30log >= 0.6"
|
||||
}
|
||||
build = {
|
||||
type = "builtin",
|
||||
modules = {
|
||||
largparse = "src/largparse.lua",
|
||||
["largparse.state"] = "src/state.lua"
|
||||
}
|
||||
}
|
@@ -7,9 +7,6 @@ parser:argument("input", {
|
||||
args = 2
|
||||
})
|
||||
|
||||
parser:flag("-q", "--quiet")
|
||||
parser:option("-s", "--server")
|
||||
|
||||
parser:mutually_exclusive(
|
||||
parser:flag("-q", "--quiet"),
|
||||
parser:option("-s", "--server")
|
||||
|
Reference in New Issue
Block a user