Skip to content

kuri65536/py_argumentparser.nim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yet another option parser like python api.

yet another options parser to be able to replace python api.

  • python like api, not compatible with nim's parseopt.
  • but strict type checking with nim language.

How to use

use from nimble::

$ nimble install https://github.com/kuri65536/py_argumentparser.nim

from git::

$ git clone install https://github.com/kuri65536/py_argumentparser.nim py_argumentparser
$ cat > test.nim <<EOF
import py_argumentparser
var parser = initArgumentParser()
parser.add_argument('t', "test", default = "is ng")
var opts = parser.parse_args()
echo "test: " & opts.get_string("test")
EOF
$ nim c -r test.nim --test "is ok"
test: is ok

Requirements

  • nim (>= 0.19.4)

Implement status

argument impl. memo
string o
multiple strings x
boolean o
integer o
float o
arguments x

Development Environment

term description
OS Debian on Android 10
lang nim 0.19.4 in Debian bundled

License

see the top of source code, it is MPL2.0.

Samples

see tests folder.

Release

version description
0.2.0 change some API for more type strictly
0.1.0 1st version

Donations

If you are feel to nice for this software, please donation to my

  • Bitcoin | 19AyoXxhm8nzgcxgbiXNPkiqNASfc999gJ |
  • Ether | 0x3a822c36cd5184f9ff162c7a55709f3d6d861608 |
  • or librapay, I'm glad from smaller (about $1) and welcome more :D

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages