chart

package
v0.0.0-...-4d529e0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cli.Command{
	Name:   "chart",
	Usage:  "Create a family tree chart.",
	Action: chartCmd,
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:        "gedcom",
			Aliases:     []string{"g", "input"},
			Usage:       "GEDCOM file to read from",
			Destination: &chartopts.gedcomFile,
		},
		&cli.StringFlag{
			Name:        "type",
			Aliases:     []string{"t"},
			Usage:       "Type of chart to produce, descendant or ancestor",
			Destination: &chartopts.chartType,
		},
		&cli.StringFlag{
			Name:        "id",
			Usage:       "Identifier to give this tree (mainly to pick up configured annotations)",
			Destination: &chartopts.treeID,
		},
		&cli.StringFlag{
			Name:        "output",
			Usage:       "output image filename",
			Destination: &chartopts.outputFilename,
		},
		&cli.StringFlag{
			Name:        "person",
			Usage:       "identifier of person to build tree from",
			Destination: &chartopts.startPersonID,
		},
		&cli.StringFlag{
			Name:        "key",
			Aliases:     []string{"k"},
			Usage:       "Identifier of the key individual",
			Destination: &chartopts.keyPersonID,
		},
		&cli.StringFlag{
			Name:        "title",
			Usage:       "Title to add to chart",
			Destination: &chartopts.title,
		},
		&cli.IntFlag{
			Name:        "gen",
			Usage:       "number of generations to draw",
			Value:       2,
			Destination: &chartopts.generations,
		},
		&cli.IntFlag{
			Name:        "detail",
			Usage:       "level of detail to include with each person (0:none,1:years,2:dates,3:full)",
			Value:       3,
			Destination: &chartopts.detail,
		},
		&cli.BoolFlag{
			Name:        "direct",
			Usage:       "only show children of direct ancestors (for descendant charts)",
			Value:       false,
			Destination: &chartopts.directOnly,
		},
		&cli.Float64Flag{
			Name:        "font-scale",
			Usage:       "scale all fonts by this factor",
			Value:       1.0,
			Destination: &chartopts.fontScale,
		},
		&cli.StringFlag{
			Name:        "config",
			Aliases:     []string{"c"},
			Value:       tree.DefaultConfigDir(),
			Usage:       "Path to the folder where tree config can be found.",
			Destination: &chartopts.configDir,
		},
	}, logging.Flags...),
}

Functions

func BuildAncestorChart

func BuildAncestorChart(t *tree.Tree, startPerson *model.Person, detail int, depth int) (*gtree.AncestorChart, error)

func BuildDescendantChart

func BuildDescendantChart(t *tree.Tree, startPerson *model.Person, detail int, depth int, directOnly bool) (*gtree.DescendantChart, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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