printer

package
v0.1.31 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package printer provides functions to format and print bookmark data, including records, tags, and repository information.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidFormat = errors.New("invalid format")
	ErrUnknownFormat = errors.New("unknown format")
)
View Source
var ValidFormats = []string{
	"oneline",
	"json",
	"id",
	"url",
	"title",
	"tags",
	"desc",
	"notes",
}

Functions

func ByField

func ByField(bs []*bookmark.Bookmark, f string) error

ByField prints the selected field.

func DatabasesTable added in v0.1.22

func DatabasesTable(ctx context.Context, c *ui.Console, fp string) error

DatabasesTable shows a simple table in database information.

func Display added in v0.1.30

func Display(c *ui.Console, format string, bs []*bookmark.Bookmark) error

func Notes added in v0.1.27

func Notes(c *ui.Console, bs []*bookmark.Bookmark) error

Notes formats the bookmarks notes.

func Oneline

func Oneline(c *ui.Console, bs []*bookmark.Bookmark) error

Oneline formats the bookmarks in oneline.

func Records

func Records(c *ui.Console, bs []*bookmark.Bookmark) error

Records prints the bookmarks in a frame format with the given colorscheme.

func RecordsJSON

func RecordsJSON(bs []*bookmark.Bookmark) error

RecordsJSON formats the bookmarks in RecordsJSON.

func RepoInfo

func RepoInfo(a *app.Context) error

RepoInfo prints the database info.

func TagsJSON

func TagsJSON(ctx context.Context, p string) error

TagsJSON formats the tags counter in JSON.

func TagsList

func TagsList(ctx context.Context, p string) error

TagsList lists the tags.

Types

This section is empty.

Jump to

Keyboard shortcuts

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