TUI table-viewer library for tableview.
Exports the public API for embedding the interactive viewer in other Nim programs:
- viewTable – launch the viewer with an already-parsed TableData value.
- viewTabularFile – launch the viewer directly from a file path or "-" for stdin.
The TableData, ColumnType, and parser procedures from parser are re-exported so callers only need to import this module.
Procs
proc getMounted[T](node: T; ctx: var Context[State]): T
proc renderRoot(node: nw.Node; ctx: var Context[State]) {. ...raises: [Exception, KeyError], tags: [RootEffect], forbids: [].}
proc viewTable(data: TableData; schemeName: string = "default"; filename: string = ""; hasHeader: bool = true) {. ...raises: [KeyError, IllwaveError, IOError, Exception], tags: [RootEffect, ReadEnvEffect, WriteIOEffect, ReadDirEffect, TimeEffect], forbids: [].}
- Launch the interactive TUI table viewer with in-memory TableData. filename is optional and only used for display in the status bar.
proc viewTabularFile(path: string; schemeName: string = "default"; delimiter: char = '\x00'; skipLines: int = 0; skipPrefix: string = ""; hasHeader: bool = true; maxColWidth: int = 20) {. ...raises: [IOError, OSError, KeyError, IllwaveError, Exception], tags: [ ReadIOEffect, WriteIOEffect, RootEffect, ReadEnvEffect, ReadDirEffect, TimeEffect], forbids: [].}
- Launch the interactive TUI table viewer for a file path or "-" for stdin.
Methods
method mount(node: nw.Node; ctx: var Context[State]) {.base, locks: "unknown", ...raises: [], tags: [], forbids: [].}
method render(node: nw.Box; ctx: var Context[State]) {....raises: [Exception], tags: [RootEffect], forbids: [].}
method render(node: nw.Node; ctx: var Context[State]) {.base, locks: "unknown", ...raises: [], tags: [], forbids: [].}
method render(node: nw.Scroll; ctx: var Context[State]) {. ...raises: [Exception, KeyError], tags: [RootEffect], forbids: [].}
method render(node: nw.Text; ctx: var Context[State]) {. ...raises: [ValueError, Exception, KeyError], tags: [RootEffect], forbids: [].}
method unmount(node: nw.Node; ctx: var Context[State]) {.base, locks: "unknown", ...raises: [], tags: [], forbids: [].}