diff options
author | Mark Powers <mark@marks.kitchen> | 2022-02-20 20:41:34 -0600 |
---|---|---|
committer | Mark Powers <mark@marks.kitchen> | 2022-02-20 20:41:34 -0600 |
commit | a8d4877907f9df3d0ba88f900440e4cb4d7603b1 (patch) | |
tree | 10ff70059e1a79970c3f030b93e5909bce76e436 /wikijscmd/app.py | |
parent | 5ad896564bb220137b500be4549bd5b714a08069 (diff) |
Add view command
Diffstat (limited to 'wikijscmd/app.py')
-rw-r--r-- | wikijscmd/app.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wikijscmd/app.py b/wikijscmd/app.py index 7b2fe0f..9dc3cd5 100644 --- a/wikijscmd/app.py +++ b/wikijscmd/app.py @@ -4,7 +4,7 @@ import sys import argparse from wikijscmd.config import config -from wikijscmd.commands import create, edit, single, tree, today, move, fill_in_pages, latest_journal_entry +from wikijscmd.commands import create, edit, single, tree, today, move, fill_in_pages, latest_journal_entry, view from wikijscmd.tui import tui def main(): @@ -47,6 +47,10 @@ def main(): parser_tui = subparsers.add_parser("tui", help="lauch a ncurses interface") parser_tui.set_defaults(command=tui) + parser_view = subparsers.add_parser("view", help="open HTML page") + parser_view.add_argument("path", type=str, help="the path of the page to view") + parser_view.set_defaults(command=view) + args = vars(parser.parse_args()) callback = args["command"] if callback is None: |