render

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package render draws the plain text listing that `sitrep ls` prints, from a snapshot: an Inbox, then a table of sessions with their Objective, Progress and Now, and optionally their queues. The text is the bash one (render_frame in bin/sitrep), without its height limit, wrapping and highlight, which belonged to the retired watch loop.

Index

Constants

View Source
const MaxLabelWidth = 19

MaxLabelWidth is the widest the first column grows: a name of at most 12 columns, a space and the short id in parentheses.

Variables

This section is empty.

Functions

func Frame

func Frame(snap snapshot.Snapshot, o Opts) []string

Frame draws the listing, one string per line. It is empty when there is nothing to show.

Types

type Opts

type Opts struct {
	Verbose bool // add the Progress line, and list each queue when Items is above 0
	Items   int  // how many queue items to list
	Cols    int  // the width the Inbox and queue lines are cut to
}

Opts say how to draw.

func (Opts) Cap

func (o Opts) Cap() int

Cap is how many items of each queue the snapshot has to hold for these options.

func (Opts) List

func (o Opts) List() bool

List says whether queues are listed, not just summarized.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL