Skip to content

Commit

Permalink
Fix id_str arg parsing short value and doc string.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkinsspatial committed Jun 24, 2024
1 parent d7be29f commit bddb9d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hls_vi/generate_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,11 @@ def __call__(self, data: BandData) -> np.ma.masked_array:
return np.ma.round(scaled_index).astype(np.int16)


def parse_args() -> Tuple[Path, Path]:
short_options = "i:o:"
long_options = ["inputdir=", "outputdir="]
def parse_args() -> Tuple[Path, Path, str]:
short_options = "i:o:s:"
long_options = ["inputdir=", "outputdir=", "idstring="]
command = os.path.basename(sys.argv[0])
help_text = f"usage: {command} -i <input_dir> -o <output_dir>"
help_text = f"usage: {command} -i <input_dir> -o <output_dir> -s <id_string>"

argv = sys.argv[1:]

Expand All @@ -369,7 +369,7 @@ def parse_args() -> Tuple[Path, Path]:
input_dir = value
elif option in ("-o", "--outputdir"):
output_dir = value
elif option in ("-id", "--idstring"):
elif option in ("-s", "--idstring"):
id_str = value

if input_dir is None or output_dir is None:
Expand Down

0 comments on commit bddb9d0

Please sign in to comment.