-
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.
Updated to newer KekUploadLibrary and added new option for uploading …
…without chunk hashing
- Loading branch information
1 parent
5f0426b
commit 3987b90
Showing
5 changed files
with
222 additions
and
197 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
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
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,46 +1,47 @@ | ||
using System.Text; | ||
using ManyConsole; | ||
|
||
namespace KekUploadCLIClient | ||
namespace KekUploadCLIClient; | ||
|
||
public class Program | ||
{ | ||
public class Program | ||
{ | ||
public const string Version = "1.0.0.4"; | ||
public const string Version = "1.0.0.5"; | ||
|
||
private static TextWriter? _console; | ||
private static TextWriter? _console; | ||
|
||
public static int Main(string[] args) | ||
{ | ||
var builder = new StringBuilder(); | ||
foreach (var s in args) | ||
{ | ||
builder.Append(s); | ||
builder.Append(" "); | ||
} | ||
|
||
var commands = GetCommands(); | ||
if (builder.ToString().ToLower().Contains(" -s true") || builder.ToString().ToLower().Contains(" --silent true")) | ||
{ | ||
Silent = true; | ||
_console = TextWriter.Null; | ||
return ConsoleCommandDispatcher.DispatchCommand(commands, args, TextWriter.Null); | ||
} | ||
Silent = false; | ||
_console = Console.Out; | ||
Console.WriteLine("KekUploadCLIClient v" + Version + " made by CraftingDragon007 and KekOnTheWorld."); | ||
return ConsoleCommandDispatcher.DispatchCommand(commands, args, Console.Out); | ||
} | ||
|
||
public static IEnumerable<ConsoleCommand> GetCommands() | ||
public static bool Silent { get; private set; } | ||
|
||
public static int Main(string[] args) | ||
{ | ||
var builder = new StringBuilder(); | ||
foreach (var s in args) | ||
{ | ||
return ConsoleCommandDispatcher.FindCommandsInSameAssemblyAs(typeof(Program)); | ||
builder.Append(s); | ||
builder.Append(' '); | ||
} | ||
|
||
public static bool Silent { get; private set; } | ||
public static void WriteLine(string text) | ||
var commands = GetCommands(); | ||
if (builder.ToString().ToLower().Contains(" -s true") || | ||
builder.ToString().ToLower().Contains(" --silent true")) | ||
{ | ||
_console?.WriteLine(text); | ||
Silent = true; | ||
_console = TextWriter.Null; | ||
return ConsoleCommandDispatcher.DispatchCommand(commands, args, TextWriter.Null); | ||
} | ||
|
||
Silent = false; | ||
_console = Console.Out; | ||
Console.WriteLine("KekUploadCLIClient v" + Version + " made by CraftingDragon007 and KekOnTheWorld."); | ||
return ConsoleCommandDispatcher.DispatchCommand(commands, args, Console.Out); | ||
} | ||
|
||
public static IEnumerable<ConsoleCommand> GetCommands() | ||
{ | ||
return ConsoleCommandDispatcher.FindCommandsInSameAssemblyAs(typeof(Program)); | ||
} | ||
} | ||
|
||
public static void WriteLine(string text) | ||
{ | ||
_console?.WriteLine(text); | ||
} | ||
} |
Oops, something went wrong.