|
|
|
using Console.Waterworks;
|
|
|
|
using Console.Waterworks.Attributes;
|
|
|
|
using System;
|
|
|
|
using static WetPancake.Pancake;
|
|
|
|
using static System.Environment;
|
|
|
|
|
|
|
|
namespace WetPancakeCLI
|
|
|
|
{
|
|
|
|
public static class ConsoleCommands
|
|
|
|
{
|
|
|
|
[ListCommand]
|
|
|
|
[Description("Prints a test message to the console.")]
|
|
|
|
[Parameters("none")]
|
|
|
|
[Usage("> Test")]
|
|
|
|
public static string Test() => "SUCCESS: Console.Waterworks is wired into Wet Pancake CLI.";
|
|
|
|
|
|
|
|
[ListCommand]
|
|
|
|
[Description("Lists out the commands this program offers.")]
|
|
|
|
[Parameters("none")]
|
|
|
|
[Usage("> Help")]
|
|
|
|
public static string Help() => new CW_Liaison().RequestHelpDocumentation("WetPancakeCLI");
|
|
|
|
|
|
|
|
[ListCommand]
|
|
|
|
[Description("Exits out of the program.")]
|
|
|
|
[Parameters("none")]
|
|
|
|
[Usage("> Exit")]
|
|
|
|
public static void Exit() => Environment.Exit(ExitCode);
|
|
|
|
|
|
|
|
[ListCommand]
|
|
|
|
[Description("Generates random text, the number of sentences generated is randomly determined.")]
|
|
|
|
[Parameters("none")]
|
|
|
|
[Usage("> GenerateRandomText")]
|
|
|
|
public static string GenerateRandomText() => RequestRandomText();
|
|
|
|
|
|
|
|
[ListCommand]
|
|
|
|
[Description ("Generates text using the gibberish level and number of sentences specified by the user.")]
|
|
|
|
[Parameters("gibberish level: int, sentences: int")]
|
|
|
|
[Usage("> GenerateText 5 10")]
|
|
|
|
public static string GenerateText(int gibberishLevel, int sentences) => RequestText(gibberishLevel, sentences);
|
|
|
|
|
|
|
|
[ListCommand]
|
|
|
|
[Description("Loads the specified .txt file and generates text based on it using the gibberish level and number of sentences specified by the user.")]
|
|
|
|
[Parameters("gibberish level: int, sentences: int, file path: string")]
|
|
|
|
[Usage("> RequestTextFromFile 3 6 C:/yourfile.txt")]
|
|
|
|
public static string RequestTextFromFile(int gibberishLevel, int sentences, string filePath) => RequestTextFromFile(gibberishLevel, sentences, filePath);
|
|
|
|
}
|
|
|
|
}
|