Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# QuickArgParse
Fast command line argument parsing in Julia. No bells and whistles.
Fast command-line argument parsing in Julia. No bells and whistles.

When QuickArgParse is used to parse command line arguments, required arugments must be provided in order
When QuickArgParse is used to parse command-line arguments, required argments must be provided in order
before optional arguments.

Optional arguments are preceded by --

Flags are preceded by a single - and must be single letter. Their value is false by default,
and changes to true if the flag is included as a command line argument (ie -w).
and changes to true if the flag is included as a command-line argument (i.e. -w).

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

#process the input vectors
R = process_reqs(req;reqHelp=reqhelp,flags=flags,flagHelp=flagHelp,title=title,desc=desc,
optTag=opts,optHelp=optsHelp,optDefault=optsDefault)
R = process_reqs(req; reqHelp=reqhelp, flags=flags, flagHelp=flagHelp, title=title, desc=desc,
optTag=opts, optHelp=optsHelp, optDefault=optsDefault)

#build a usage statement string
build_usage!(R)
Expand All @@ -34,7 +34,7 @@ build_usage!(R)
A = parse_args(R)
```

The resulting dict A contains the values for all command line arguments, keyed by the string
The resulting Dict A contains the values for all command line arguments, keyed by the string
variable specified in the input vectors to process_reqs (ie "Arg1", "opt1", "w"). If optional
argument names are provided (the opt vector), default values must also be provided (optsHelp).
These can be any type.
Expand All @@ -56,7 +56,5 @@ These can be any type.
> --opt1 < opt1Default > : First optional argument
> --opt2 < 28 > : Second optional argument
>
>\# Optional Flags
>\# Optional Flags
> -w : a flag, value is always true/false (default false)