Skip to content

Commit

Permalink
#520 Add wdp arg to CLI total functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Dec 16, 2024
1 parent 8c4b557 commit ba75af9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/scribe_data/cli/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_data(
The case format for identifiers. Default is "camel".
wikidata_dump : str
The local Wikidata dump that should be used to get data.
The local Wikidata dump that can be used to process data.
Returns
-------
Expand Down
9 changes: 8 additions & 1 deletion src/scribe_data/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def main() -> None:
"-wdp",
"--wikidata-dump-path",
type=str,
help="Path to a local Wikidata lexemes dump required for running with '--all'.",
help="Path to a local Wikidata lexemes dump for running with '--all'.",
)

# MARK: Total
Expand Down Expand Up @@ -196,6 +196,12 @@ def main() -> None:
total_parser.add_argument(
"-i", "--interactive", action="store_true", help="Run in interactive mode"
)
total_parser.add_argument(
"-wdp",
"--wikidata-dump-path",
type=str,
help="Path to a local Wikidata lexemes dump for running with '--all'.",
)

# MARK: Convert

Expand Down Expand Up @@ -371,6 +377,7 @@ def main() -> None:
if args.data_type is not None
else None,
all_bool=args.all,
wikidata_dump=args.wikidata_dump_path,
)

elif args.command in ["convert", "c"]:
Expand Down
4 changes: 4 additions & 0 deletions src/scribe_data/cli/total.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ def total_wrapper(
language: Union[str, List[str]] = None,
data_type: Union[str, List[str]] = None,
all_bool: bool = False,
wikidata_dump: str = None,
) -> None:
"""
Conditionally provides the full functionality of the total command.
Expand All @@ -385,6 +386,9 @@ def total_wrapper(
all_bool : boolean
Whether all languages and data types should be listed.
wikidata_dump : str
The local Wikidata dump that can be used to process data.
"""

if (not language and not data_type) and all_bool:
Expand Down

0 comments on commit ba75af9

Please sign in to comment.