Skip to content

Commit

Permalink
Added example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
brmcdonald committed Aug 18, 2021
1 parent 32f1c0a commit c29433c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# QuickArgParse
Fast command line argument parsing in Julia. No bells and whistles.

### Example
All inputs except req are optional.

```Julia
req = ["Arg1","Arg2"]
reqhelp = ["First Argument","Second Argument"]
opts= ["opt1","opt2"]
optsHelp = ["First optional argument","Second optional argument"]
optsDefault = ["opt1 default","opt2 default"]
flags = ["w"]
flagHelp = ["a flag, true/false (default false)"]
title = "Example usage statement"
desc = "A demo version of a usage statement showing the code required to generate it"


R = process_reqs(req;reqHelp=reqhelp,flags=flags,flagHelp=flagHelp,title=title,desc=desc,
optTag=opts,optHelp=optsHelp,optDefault=optsDefault)
build_usage!(R)
A = parse_args(R)
```

0 comments on commit c29433c

Please sign in to comment.