forked from kutoga/FluentArgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a README_nuget markdown file (kutoga#19)
- Loading branch information
Showing
4 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
cd "$(dirname "$0")" | ||
|
||
echo "$(date) Start building README.md..." | ||
python3 ./doc/scripts/include_resolve.py ./doc/README.md.template > ./README.md | ||
echo "$(date) Built README.md..." | ||
|
||
echo "$(date) Start building README_nuget.md..." | ||
python3 ./doc/scripts/include_resolve.py ./doc/README_nuget.md.template > ./doc/README_nuget.md | ||
echo "$(date) Built README_nuget.md..." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FluentArgs is a library to parse command line arguments. It focuses on a very simple API and | ||
strong typing. It is able to generate a help view and proper error messages. | ||
|
||
Example code: | ||
```csharp | ||
namespace Example | ||
{ | ||
using System; | ||
using System.Threading.Tasks; | ||
using FluentArgs; | ||
|
||
public static class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
FluentArgsBuilder.New() | ||
.Parameter("-i", "--input").IsRequired() | ||
.Parameter("-o", "--output").IsRequired() | ||
.Parameter<ushort>("-q", "--quality") | ||
.WithValidation(n => n >= 0 && n <= 100) | ||
.IsOptionalWithDefault(50) | ||
.Call(quality => outputFile => inputFile => | ||
{ | ||
/* ... */ | ||
Console.WriteLine($"Convert {inputFile} to {outputFile} with quality {quality}..."); | ||
/* ... */ | ||
}) | ||
.Parse(args); | ||
} | ||
} | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FluentArgs is a library to parse command line arguments. It focuses on a very simple API and | ||
strong typing. It is able to generate a help view and proper error messages. | ||
|
||
Example code: | ||
```csharp | ||
!INCLUDE:examples/Simple01.cs | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters