Skip to content

Commit

Permalink
generalized arg parse
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Jan 31, 2024
1 parent 658b59d commit 58cb470
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/nbiatoolkit/nbia_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ def getBodyPartCounts_cli() -> None:


def getSeries_cli() -> None:
p = argparse.ArgumentParser(description="NBIAToolkit: get series")
global query
global output
query = f"series"

p = general_argParser()

p.add_argument(
"--collection",
Expand Down Expand Up @@ -323,10 +327,17 @@ def getSeries_cli() -> None:
type=str,
)



args = p.parse_args()

global query
query = f"series"
if args.version:
version()
sys.exit(0)

if args.output:
output = args.output


return getResults_cli(
func=NBIAClient().getSeries,
Expand Down

0 comments on commit 58cb470

Please sign in to comment.