genbio

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cli.Command{
	Name:      "genbio",
	Usage:     "Print generated biographies for the given people (temporary, for iteration).",
	ArgsUsage: "[id...]",
	Action:    genbioCmd,
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:        "gramps",
			Usage:       "Gramps xml file to read from",
			Destination: &cmdopts.grampsFile,
		},
		&cli.StringFlag{
			Name:        "gramps-dbname",
			Usage:       "Name of the gramps database, used to keep IDs consistent between versions of the same database",
			Destination: &cmdopts.grampsDatabaseName,
		},
	}, logging.Flags...),
}

Command is a temporary subcommand that prints the generated biography for each supplied identifier, used to iterate the generator against real data.

Functions

func Bio

func Bio(s Subject) string

Bio returns a plain-text short biography of s.

func BioFromPerson

func BioFromPerson(p *model.Person) string

BioFromPerson returns a plain-text short biography of p.

Types

type Subject

type Subject struct {
	*model.Person
}

Subject is the input to Bio, carrying the facts a biography is drawn from. It currently embeds a model.Person; individual fields will be promoted onto Subject as the package is decoupled from the genster model.

func FromPerson

func FromPerson(p *model.Person) Subject

FromPerson returns a Subject drawn from p.

Jump to

Keyboard shortcuts

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