TV Programs
Within the context of TUIview, a TV Program is a Python file that defines an Argparse ArgumentParser that models the CLI interface of another tool.
For example, to define a TV Program for the echo
command:
echo.py
import argparse
parser = argparse.ArgumentParser(prog="echo", description="Print text.")
parser.add_argument("message", nargs="+")
parser.add_argument("-n", action="store_true", help="no trailing newline")
Execute the program file with tv
:
$ tv echo.py -n Hello World