Skip to content

Commit 99bb9d0

Browse files
committed
[__main__] command line support for direction subcmd
1 parent 3426625 commit 99bb9d0

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

lib/pathins/__main__.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import sys
66

77
from . import __version__
8+
from .direction import direction_run
89
from .path import path_run
910

10-
# from .direction import direction_run
1111
# from .overlap import overlap_run
1212
# from .report import report_run
1313

@@ -29,22 +29,20 @@ def run(argv) -> None:
2929
# -----------------------------
3030
# direction sub-command parser
3131
# -----------------------------
32-
# parser_direction = subparsers.add_parser(
33-
# "direction",
34-
# help="Path direction inspection",
35-
# description="Path direction inspection",
36-
# )
37-
# parser_direction.add_argument(
38-
# "-v", "--version", action="version", version=f"pathins v{__version__}"
39-
# )
40-
# parser_direction.add_argument(
41-
# "--nocolor", action="store_true", help="no ANSI color"
42-
# )
43-
# parser_direction.add_argument("fontpath", type=str, help="font file path")
44-
# parser_direction.add_argument(
45-
# "glyphname", type=str, help="glyph name (optional, default=all)", nargs="?"
46-
# )
47-
# parser_direction.set_defaults(func=direction_run)
32+
parser_direction = subparsers.add_parser(
33+
"direction",
34+
help="Path direction inspection",
35+
description="Path direction inspection",
36+
)
37+
parser_direction.add_argument(
38+
"-v", "--version", action="version", version=f"pathins v{__version__}"
39+
)
40+
parser_direction.add_argument("--nocolor", action="store_true", help="no ANSI color")
41+
parser_direction.add_argument("fontpath", type=str, help="font file path")
42+
parser_direction.add_argument(
43+
"glyphname", type=str, help="glyph name (optional, default=all)", nargs="?"
44+
)
45+
parser_direction.set_defaults(func=direction_run)
4846

4947
# -----------------------------
5048
# overlap sub-command parser

0 commit comments

Comments
 (0)