TUI
Terminal user interface (TUI) helper functions and components.
print_nb(path, console=<console width=80 None>)
Show rich representation of notebook in terminal.
Source code in databooks/tui.py
def print_nb(path: Path, console: Console = databooks_console) -> None:
"""Show rich representation of notebook in terminal."""
notebook = JupyterNotebook.parse_file(path)
console.rule(path.resolve().name)
console.print(notebook)
print_nbs(paths, console=<console width=80 None>, use_pager=False, **kwargs_print_nb)
Show rich representation of notebooks in terminal.
Source code in databooks/tui.py
def print_nbs(
paths: List[Path],
console: Console = databooks_console,
use_pager: bool = False,
**kwargs_print_nb: Any
) -> None:
"""Show rich representation of notebooks in terminal."""
with console.pager(styles=True) if use_pager else nullcontext(): # type: ignore
for path in paths:
print_nb(path, console=console, **kwargs_print_nb)