Add things to README.md
This commit is contained in:
parent
c1304e9714
commit
6f7532cc7a
44
README.md
44
README.md
|
|
@ -0,0 +1,44 @@
|
||||||
|
# Argument_Parser
|
||||||
|
|
||||||
|
A Command-Line interface for Ada, heavily inspired by the advice
|
||||||
|
from [clig.dev](www.clig.dev).
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
The library can be easily build with `gprbuild`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gprbuild -Pargument_parser
|
||||||
|
```
|
||||||
|
|
||||||
|
The static library is then available under `lib`.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```Ada
|
||||||
|
with Argument_Parser; use Argument_Parser;
|
||||||
|
|
||||||
|
procedure Main is
|
||||||
|
|
||||||
|
Parser : Argument_Parser;
|
||||||
|
|
||||||
|
begin
|
||||||
|
|
||||||
|
Parser.Add_Positional (
|
||||||
|
Integer_Option,
|
||||||
|
"Index",
|
||||||
|
"The Index of the input");
|
||||||
|
|
||||||
|
Parser.Add_Positional (
|
||||||
|
String_Option,
|
||||||
|
"Name",
|
||||||
|
"Name of the project");
|
||||||
|
|
||||||
|
Parser.Add_Option (
|
||||||
|
Boolean_Option (False),
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
end Main;
|
||||||
|
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue
Block a user