Add --format param
This commit is contained in:
parent
b24f573eb9
commit
c450051218
1 changed files with 6 additions and 1 deletions
|
@ -37,7 +37,7 @@ namespace SearchBoxCLI
|
|||
private static string SearchIndexFilepath = string.Empty;
|
||||
private static TextReader Source = Console.In;
|
||||
private static TextReader SourceOld = null, SourceNew = null;
|
||||
private static OutputModes OutputMode = OutputModes.Json;
|
||||
private static OutputModes OutputMode = OutputModes.Text;
|
||||
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
|
@ -82,6 +82,10 @@ namespace SearchBoxCLI
|
|||
SearchIndexFilepath = args[++i];
|
||||
break;
|
||||
|
||||
case "format":
|
||||
OutputMode = (OutputModes)Enum.Parse(typeof(OutputModes), args[++i], true);
|
||||
break;
|
||||
|
||||
case "help":
|
||||
return HandleHelp();
|
||||
|
||||
|
@ -122,6 +126,7 @@ namespace SearchBoxCLI
|
|||
Console.WriteLine(" update Update a named document in a search index.");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Options:");
|
||||
Console.WriteLine(" --format Sets the format of the output. Possible values: text (default), json");
|
||||
Console.WriteLine(" --source, -s Specifies the path to the source document {index, add}");
|
||||
Console.WriteLine(" --old-source Specifies the path to the old version of the source document to update {update}");
|
||||
Console.WriteLine(" --new-source Specifies the path to the new version of the source document to update {update}");
|
||||
|
|
Loading…
Reference in a new issue