fh_tool-cli 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/PKG-INFO +1 -1
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/pyproject.toml +1 -1
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/src/fh_tool_cli/cli.py +19 -3
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/src/fh_tool_cli.egg-info/PKG-INFO +1 -1
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/README.md +0 -0
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/setup.cfg +0 -0
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/src/fh_tool_cli/__init__.py +0 -0
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/src/fh_tool_cli.egg-info/SOURCES.txt +0 -0
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/src/fh_tool_cli.egg-info/dependency_links.txt +0 -0
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/src/fh_tool_cli.egg-info/entry_points.txt +0 -0
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/src/fh_tool_cli.egg-info/requires.txt +0 -0
- {fh_tool_cli-0.1.0 → fh_tool_cli-0.1.1}/src/fh_tool_cli.egg-info/top_level.txt +0 -0
|
@@ -739,8 +739,14 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
|
|
|
739
739
|
parser = argparse.ArgumentParser(
|
|
740
740
|
prog=Path(sys.argv[0]).name or "fh-tool",
|
|
741
741
|
description="本地管理 FiberHome /fh_tool 接口的 CLI。",
|
|
742
|
+
epilog="使用 COMMAND -h 查看具体命令参数。",
|
|
743
|
+
)
|
|
744
|
+
subparsers = parser.add_subparsers(
|
|
745
|
+
dest="command",
|
|
746
|
+
required=True,
|
|
747
|
+
metavar="COMMAND",
|
|
748
|
+
title="commands",
|
|
742
749
|
)
|
|
743
|
-
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
744
750
|
|
|
745
751
|
probe = subparsers.add_parser("probe", help="低风险探测 fh_tool 是否可用")
|
|
746
752
|
add_common_options(probe)
|
|
@@ -753,7 +759,12 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
|
|
|
753
759
|
ports.set_defaults(handler=command_ports)
|
|
754
760
|
|
|
755
761
|
config = subparsers.add_parser("config", help="管理本机 CLI 配置")
|
|
756
|
-
config_subparsers = config.add_subparsers(
|
|
762
|
+
config_subparsers = config.add_subparsers(
|
|
763
|
+
dest="config_command",
|
|
764
|
+
required=True,
|
|
765
|
+
metavar="SUBCOMMAND",
|
|
766
|
+
title="config commands",
|
|
767
|
+
)
|
|
757
768
|
config_show = config_subparsers.add_parser("show", help="显示配置")
|
|
758
769
|
config_show.add_argument("--config", default=str(DEFAULT_CONFIG_PATH))
|
|
759
770
|
config_show.add_argument("--json", action="store_true")
|
|
@@ -840,7 +851,12 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
|
|
|
840
851
|
set_preconfig.set_defaults(handler=command_set_preconfig)
|
|
841
852
|
|
|
842
853
|
telnet = subparsers.add_parser("telnet", help="管理 runtime Telnet")
|
|
843
|
-
telnet_subparsers = telnet.add_subparsers(
|
|
854
|
+
telnet_subparsers = telnet.add_subparsers(
|
|
855
|
+
dest="telnet_command",
|
|
856
|
+
required=True,
|
|
857
|
+
metavar="SUBCOMMAND",
|
|
858
|
+
title="telnet commands",
|
|
859
|
+
)
|
|
844
860
|
telnet_enable = telnet_subparsers.add_parser("enable", help="调用 TelnetEnable=1")
|
|
845
861
|
add_common_options(telnet_enable)
|
|
846
862
|
add_yes(telnet_enable)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|