Skip to content

Commit

Permalink
add --name flag for changing glossary name
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Dec 25, 2021
1 parent 66a395e commit 2f5806b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions help
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ PyGlossary is a tool for working with dictionary databases (glossaries)
[--utf8-check|--no-utf8-check] [--lower|--no-lower]
[--read-options=<u>READ_OPTIONS</u>] [--write-options=<u>WRITE_OPTIONS</u>]
[--source-lang=<u>LANGUAGE</u>] [--target-lang=<u>LANGUAGE</u>]
['--name=<u>GLOSSARY NAME</u>']

<b>Direct and indirect modes</b>
Indirect mode means the input glossary is completely read and loaded into RAM, then converted
Expand Down
8 changes: 8 additions & 0 deletions pyglossary/ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,13 @@ def main():
default=None,
help="target/definition language",
)
parser.add_argument(
"--name",
action="store",
dest="name",
default=None,
help="glossary name/title",
)

# _______________________________

Expand Down Expand Up @@ -514,6 +521,7 @@ def shouldUseCMD(args):
infoOverrideSpec = (
("sourceLang", validateLangStr),
("targetLang", validateLangStr),
("name", str),
)

config = {}
Expand Down
1 change: 1 addition & 0 deletions pyglossary/ui/ui_cmd_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def _(event: "E") -> None:
infoOverrideFlags = {
"sourceLang": "source-lang",
"targetLang": "target-lang",
"name": "name",
}


Expand Down

0 comments on commit 2f5806b

Please sign in to comment.