Skip to content

Commit

Permalink
Make required options as arguments, to simplify CLI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeeynamo committed May 13, 2020
1 parent 3c2a478 commit 842167b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions OpenKh.Command.Bbsa/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private class ExtractCommand
{
[Required]
[DirectoryExists]
[Option(CommandOptionType.SingleValue, Description = "Required. Path where the various BBSAx.DAT files are located", ShortName = "i", LongName = "input")]
[Argument(0, Description = "Required. Path where the various BBSAx.DAT files are located")]
public string InputPath { get; set; }

[Option(CommandOptionType.SingleValue, Description = "Path where the content will be extracted", ShortName = "o", LongName = "output")]
Expand Down Expand Up @@ -105,7 +105,7 @@ private class ListCommand
{
[Required]
[DirectoryExists]
[Option(CommandOptionType.SingleValue, Description = "Required. Path where the various BBSAx.DAT files are located", ShortName = "i", LongName = "input")]
[Argument(0, Description = "Required. Path where the various BBSAx.DAT files are located")]
public string InputPath { get; set; }

[Option(CommandOptionType.SingleValue, Description = "Archive file name prefix. By default it is 'BBS'.", ShortName = "p", LongName = "prefix")]
Expand Down
4 changes: 2 additions & 2 deletions OpenKh.Command.IdxImg/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private class ExtractCommand

[Required]
[FileExists]
[Option(CommandOptionType.SingleValue, Description = "Required. Kingdom Hearts II IDX file, paired with a IMG", ShortName = "i", LongName = "idx")]
[Argument(0, Description = "Kingdom Hearts II IDX file, paired with a IMG")]
public string InputIdx { get; set; }

[FileExists]
Expand Down Expand Up @@ -126,7 +126,7 @@ private class ListCommand

[Required]
[FileExists]
[Option(CommandOptionType.SingleValue, Description = "Required. Kingdom Hearts II IDX file, paired with a IMG", ShortName = "i", LongName = "idx")]
[Argument(0, Description = "Kingdom Hearts II IDX file, paired with a IMG")]
public string InputIdx { get; set; }

[Option(CommandOptionType.NoValue, Description = "Sort file list by their position in the IMG", ShortName = "s", LongName = "sort")]
Expand Down

0 comments on commit 842167b

Please sign in to comment.