KuiperZone.Utility.Yaap 1.0.2

dotnet add package KuiperZone.Utility.Yaap --version 1.0.2
NuGet\Install-Package KuiperZone.Utility.Yaap -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KuiperZone.Utility.Yaap" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KuiperZone.Utility.Yaap --version 1.0.2
#r "nuget: KuiperZone.Utility.Yaap, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install KuiperZone.Utility.Yaap as a Cake Addin
#addin nuget:?package=KuiperZone.Utility.Yaap&version=1.0.2

// Install KuiperZone.Utility.Yaap as a Cake Tool
#tool nuget:?package=KuiperZone.Utility.Yaap&version=1.0.2

Yaap

Yaap is yet another argument parser for C# .NET. It is licensed as LGPL-3.0-or-later.

SEE CLASS: KuiperZone.Utility.ArgumentParser

Argument keys are to be prefixed with '-' or "--", as shown by the following command line example:

APP value -size=100 --filename "Dir/Folder/File Name" --debug.

There is no distinction between "-" or "--". The "value" is a floating value. All other items are treated as key-value pairs. Above, the "debug" flag will be interpreted as the key-value pair: -debug=True.

Usage 1:

public static int Main(string[] args)
{
    // With array construction
    var parser = new KuiperZone.Utility.ArgumentParser(args);

    Console.WriteLine("VALUE: " + parser.Value);

    if (parser.GetOrDefault("v", false) || parser.GetOrDefault("version", false))
    {
        Console.WriteLine("1.0.0");
        return 0;
    }
}

Usage 2:

// With string construction
var parser = new KuiperZone.Utility.ArgumentParser("value -size=100 -filename \"Dir/Folder/File Name\" --debug");

// Indexer also available
Console.WriteLine(parser["filename"]);

Copyright (C) Andy Thomas, 2022-23. Website: https://kuiper.zone

Yaap is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Yaap is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Attribution

Yaap was originally based on MIT licensed work by Richard Lopes, although modifications have been substantial. No formal copyright notice found, but see: https://www.codeproject.com/Articles/3111/C-NET-Command-Line-Arguments-Parser

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on KuiperZone.Utility.Yaap:

Repository Stars
kuiperzone/AvantGarde
Avalonia XAML Preview for Linux and Windows
kuiperzone/PupNet-Deploy
PupNet Deploy is a cross-platform deployment utility which packages your .NET project as a ready-to-ship installation file in a single step.
Version Downloads Last updated
1.0.2 366 1/23/2023
1.0.1 328 11/9/2022
1.0.0 328 10/10/2022