gramps

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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CitationDate

func CitationDate(gc *grampsxml.Citation) (*model.Date, error)

func EventDate

func EventDate(grev *grampsxml.Event) (*model.Date, error)

func ParseDaterange

func ParseDaterange(dr grampsxml.Daterange) (*model.Date, error)

func ParseDatespan

func ParseDatespan(ds grampsxml.Datespan) (*model.Date, error)

func ParseDateval

func ParseDateval(dv grampsxml.Dateval) (*model.Date, error)

Types

type Loader

type Loader struct {
	DB                   *grampsxml.Database
	ScopeName            string
	TagsByHandle         map[string]*grampsxml.Tag
	EventsByHandle       map[string]*grampsxml.Event
	PeopleByHandle       map[string]*grampsxml.Person
	FamiliesByHandle     map[string]*grampsxml.Family
	CitationsByHandle    map[string]*grampsxml.Citation
	SourcesByHandle      map[string]*grampsxml.Source
	PlacesByHandle       map[string]*grampsxml.Placeobj
	ObjectsByHandle      map[string]*grampsxml.Object
	RepositoriesByHandle map[string]*grampsxml.Repository
	NotesByHandle        map[string]*grampsxml.Note
	// contains filtered or unexported fields
}

func NewLoader

func NewLoader(filename string, databaseName string) (*Loader, error)

func (*Loader) Load

func (l *Loader) Load(t *tree.Tree) error

func (*Loader) Scope

func (l *Loader) Scope() string

type ModelFinder

type ModelFinder interface {
	FindPerson(scope string, id string) *model.Person
	FindCitation(scope string, id string) (*model.GeneralCitation, bool)
	FindSource(scope string, id string) *model.Source
	FindRepository(scope string, id string) *model.Repository
	FindPlace(name string, id string) *model.Place
	FindFamilyByParents(father *model.Person, mother *model.Person) *model.Family
	FindMediaObject(path string) *model.MediaObject
	AddAlias(alias string, canonical string)
}

Jump to

Keyboard shortcuts

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