Documentation
¶
Index ¶
- Constants
- func FourFourYearIDFunc(p Person, d Database) error
- func GetFourFourBirthNameID(p Person) (string, error)
- func GetFourFourYearID(p Person) (string, error)
- func GetLastFirstNameID(p Person) (string, error)
- func GetLifeAge(p Person, referenceDate time.Time) (*timecalc.DateDiff, error)
- func HasDied(p Person, referenceDate time.Time) bool
- func IsAlive(p Person, referenceDate time.Time) bool
- func IsBorn(p Person, referenceDate time.Time) bool
- func IsMarried(p Person, referenceDate time.Time) bool
- func RenderGenealogytree(p Person, o RenderTreeOptions) ([]byte, error)
- func RenderParentSubtree(p Person, o RenderTreeOptions, headless bool) ([]byte, error)
- func RenderTemplateFile(filename string, data interface{}, customFuncMap template.FuncMap) ([]byte, error)
- func SplitPersons(personList *PersonList, split Person) (younger PersonList, older PersonList)
- func TemplateLatexifyFunc(input string) string
- type AbsoluteLevel
- func (l *AbsoluteLevel) Equals(other AbsoluteLevel) bool
- func (l *AbsoluteLevel) GetBoxOptions() LevelBoxOptions
- func (l *AbsoluteLevel) GetColor() LevelColor
- func (l *AbsoluteLevel) GetOptions() LevelOptions
- func (l *AbsoluteLevel) IsChildLevel(probandLevel int) bool
- func (l *AbsoluteLevel) IsParentLevel(probandLevel int) bool
- func (l *AbsoluteLevel) IsProbandLevel(probandLevel int) bool
- func (l *AbsoluteLevel) SetBoxOptions(lb LevelBoxOptions)
- func (l *AbsoluteLevel) SetColor(lc LevelColor)
- func (l *AbsoluteLevel) SetOptions(lb LevelOptions)
- type AttributePersons
- type BiographyElement
- type Comment
- type Database
- type DatePlace
- type FlatPerson
- func (d *FlatPerson) AddAttribute(attr string)
- func (d *FlatPerson) AddBiographyElement(biographyElement BiographyElement)
- func (d *FlatPerson) AddComment(comment Comment)
- func (d *FlatPerson) AddJob(job Job)
- func (d *FlatPerson) AddResidence(residence Residence)
- func (d *FlatPerson) AddTreePositionID(ID string) Person
- func (d *FlatPerson) ClearTreePositionIDs() Person
- func (d *FlatPerson) Copy() Person
- func (d *FlatPerson) Equals(p2 Person) bool
- func (d *FlatPerson) GetAge(now time.Time) int
- func (d *FlatPerson) GetAttributes() []string
- func (d *FlatPerson) GetBaptism() DatePlace
- func (d *FlatPerson) GetBestID() string
- func (d *FlatPerson) GetBiographyElements() []BiographyElement
- func (d *FlatPerson) GetBirth() DatePlace
- func (d *FlatPerson) GetBurial() DatePlace
- func (d *FlatPerson) GetChildNumber() *uint
- func (d *FlatPerson) GetChildren() (*PersonList, error)
- func (d *FlatPerson) GetChildrenCount() int
- func (d *FlatPerson) GetChildrenParents() (*PersonList, error)
- func (d *FlatPerson) GetChildrenWith(partner Person) (*PersonList, error)
- func (d *FlatPerson) GetComments() []Comment
- func (d *FlatPerson) GetDad() (Person, error)
- func (d *FlatPerson) GetDeadState() *bool
- func (d *FlatPerson) GetDeath() DatePlace
- func (d *FlatPerson) GetDeathAge() int
- func (d *FlatPerson) GetGender() Gender
- func (d *FlatPerson) GetGenderSources() ReferenceList
- func (d *FlatPerson) GetID() string
- func (d *FlatPerson) GetImageFilename() string
- func (d *FlatPerson) GetJobs() []Job
- func (d *FlatPerson) GetMainTreePositionID() string
- func (d *FlatPerson) GetMom() (Person, error)
- func (d *FlatPerson) GetName() Name
- func (d *FlatPerson) GetPartners() (*PersonList, error)
- func (d *FlatPerson) GetRawDad() string
- func (d *FlatPerson) GetRawMom() string
- func (d *FlatPerson) GetRelationsCount() *uint
- func (d *FlatPerson) GetRelationshipWith(partner Person) Relationship
- func (d *FlatPerson) GetRelationships() []Relationship
- func (d *FlatPerson) GetResidences() []Residence
- func (d *FlatPerson) GetSaintsDay() SaintsDay
- func (d *FlatPerson) GetSiblings() (*SiblingList, error)
- func (d *FlatPerson) GetSources() ReferenceList
- func (d *FlatPerson) GetTreePositionIDs() []string
- func (d *FlatPerson) GetUUID() string
- func (d *FlatPerson) HasChildrenCount() bool
- func (d *FlatPerson) IsAlive(referenceTime time.Time) bool
- func (d *FlatPerson) IsDummy() bool
- func (d *FlatPerson) IsEmpty() bool
- func (d *FlatPerson) IsSpitzahn() bool
- func (d *FlatPerson) IsStopPerson() bool
- func (d *FlatPerson) MatchesIDUUID(idUUIDSearches ...string) bool
- func (d *FlatPerson) MatchesSearch(search string) bool
- func (d *FlatPerson) SetBiographyElements(biographyElements []BiographyElement)
- func (d *FlatPerson) SetChildNumber(childNumber *uint)
- func (d *FlatPerson) SetComments(comments []Comment)
- func (d *FlatPerson) SetID(id string)
- func (d *FlatPerson) SetImageFilename(filename string)
- func (d *FlatPerson) SetJobs(jobs []Job)
- func (d *FlatPerson) SetRawDad(dad string)
- func (d *FlatPerson) SetRawMom(mom string)
- func (d *FlatPerson) SetRelationsCount(relationsCount *uint)
- func (d *FlatPerson) SetResidences(residences []Residence)
- func (d *FlatPerson) SetStopPerson(value bool)
- func (d FlatPerson) String() string
- type FlatRelationship
- func (f FlatRelationship) GetChildrenCount() *uint
- func (f FlatRelationship) GetDivorce() *DatePlace
- func (f FlatRelationship) GetEngagement() *DatePlace
- func (r FlatRelationship) GetEngagementDuration(a Person, referenceDate time.Time) timecalc.Duration
- func (f FlatRelationship) GetIndex() int
- func (f FlatRelationship) GetMarriage() *DatePlace
- func (r FlatRelationship) GetMarriageDuration(a Person, referenceDate time.Time) timecalc.Duration
- func (f FlatRelationship) GetMarriageReligious() *DatePlace
- func (r FlatRelationship) GetMarriageReligiousDuration(a Person, referenceDate time.Time) timecalc.Duration
- func (f FlatRelationship) GetPartner() (Person, error)
- func (f FlatRelationship) GetPartnerOrDummy() Person
- func (f FlatRelationship) HasChildrenCount() bool
- func (f *FlatRelationship) SetChildrenCount(childrenCount *uint)
- type FootnoteContainer
- type Gender
- type GenderOrder
- type GraphType
- type Job
- type LastnamePolicy
- type Level
- type LevelBoxOptions
- type LevelColor
- type LevelConfig
- type LevelOptions
- type LineageContainer
- func (l *LineageContainer) Add(ID, treePositionID string, personList PersonList) *LineageContainer
- func (l *LineageContainer) AddWithBase(ID, treePositionID, baseID string, person Person) *LineageContainer
- func (l *LineageContainer) Get(ID string) *PersonList
- func (l *LineageContainer) String() string
- type Location
- type Marriage
- type MemoryDatabase
- func (y MemoryDatabase) Anonymize()
- func (y *MemoryDatabase) Get(search string) (Person, error)
- func (y *MemoryDatabase) GetByID(ID string) (Person, error)
- func (y *MemoryDatabase) MakeIDs(f func(p Person, d Database) error) error
- func (y *MemoryDatabase) ParseYamlFile(filename string) error
- func (y *MemoryDatabase) WriteYamlFile(filename string) error
- type Name
- type NodeType
- type PartnerChildren
- type Person
- type PersonList
- func (p *PersonList) AddChildren() (*PersonList, error)
- func (p *PersonList) AddList(personList *PersonList) *PersonList
- func (p *PersonList) AddParents() (*PersonList, error)
- func (p *PersonList) AddPerson(person Person) *PersonList
- func (p *PersonList) AddSlice(persons []Person) *PersonList
- func (p *PersonList) Contains(person Person) bool
- func (p *PersonList) Count() int
- func (p *PersonList) Diff(otherList *PersonList) (*PersonList, error)
- func (p *PersonList) Exclude(persons ...Person)
- func (p *PersonList) ExcludeList(persons *PersonList)
- func (p *PersonList) GetAttributes() []AttributePersons
- func (p *PersonList) GetChildren() (PersonList, error)
- func (p *PersonList) GetFiltered(validationFunc func(p Person) bool) *PersonList
- func (p *PersonList) GetParents() (PersonList, error)
- func (p *PersonList) GetPartners() (PersonList, error)
- func (p *PersonList) GetPersons() []Person
- func (p *PersonList) GetTreePositionID() string
- func (p *PersonList) GetTreePositionIDWith(person Person) string
- func (p *PersonList) GetWithMergedTreePositionIDs() *PersonList
- func (p *PersonList) HasSameElements(other *PersonList) bool
- func (p *PersonList) Invert() *PersonList
- func (p *PersonList) Len() int
- func (p *PersonList) Less(i, j int) bool
- func (p *PersonList) MergeTreePositions(other *PersonList) *PersonList
- func (p *PersonList) Remove(person Person) *PersonList
- func (p *PersonList) RemoveDuplicatesByBestID() *PersonList
- func (p *PersonList) SortPersons(sortFunc func(a, b Person) bool) *PersonList
- func (p *PersonList) Swap(i, j int)
- type RankingItem
- type RankingList
- func (r *RankingList) AddItem(item RankingItem) *RankingList
- func (r *RankingList) GetItems() []RankingItem
- func (r *RankingList) GetTop(i int) []RankingItem
- func (r *RankingList) Len() int
- func (r *RankingList) Less(i, j int) bool
- func (r *RankingList) Lock()
- func (r *RankingList) Swap(i, j int)
- func (r *RankingList) Unlock()
- type Reference
- type ReferenceEntry
- type ReferenceList
- type ReferencesContainer
- func (f *ReferencesContainer) Add(source Reference, isMainSource bool) string
- func (f *ReferencesContainer) GetKey(source Reference) string
- func (f *ReferencesContainer) GetKeyByIndex(i int) string
- func (f *ReferencesContainer) GetLabel(search Reference) string
- func (f *ReferencesContainer) GetLabelFor(source Reference) string
- func (f *ReferencesContainer) GetMainReferences() []ReferenceEntry
- func (f *ReferencesContainer) GetNonMainReferences() []ReferenceEntry
- func (f *ReferencesContainer) GetSources() []ReferenceEntry
- func (f *ReferencesContainer) Has(search Reference) bool
- func (f *ReferencesContainer) SetLabelBase(base string)
- type Relationship
- type RelativeLevel
- func (l *RelativeLevel) GetBoxOptions() LevelBoxOptions
- func (l *RelativeLevel) GetColor() LevelColor
- func (l *RelativeLevel) GetOptions() LevelOptions
- func (l *RelativeLevel) SetBoxOptions(lb LevelBoxOptions)
- func (l *RelativeLevel) SetColor(lc LevelColor)
- func (l *RelativeLevel) SetOptions(lb LevelOptions)
- type RenderPersonOptions
- type RenderTreeOptions
- type Residence
- type SaintsDay
- type SiblingList
- type Source
- type SourceEntry
- type SourcedDate
- type SourcesContainer
- func (f *SourcesContainer) Add(key string) string
- func (f *SourcesContainer) GetKey(text string) string
- func (f *SourcesContainer) GetKeyByIndex(i int) string
- func (f *SourcesContainer) GetLabel(search string) string
- func (f *SourcesContainer) GetLabelFor(input string) string
- func (f *SourcesContainer) GetMainSource() SourceEntry
- func (f *SourcesContainer) GetNotes() []SourceEntry
- func (f *SourcesContainer) Has(search string) bool
- func (f *SourcesContainer) SetLabelBase(base string)
- func (f *SourcesContainer) SetMainSource(mainSource SourceEntry)
- type Stats
- func (s *Stats) AliveCount(personList *PersonList) int
- func (s *Stats) AlivePersons(personList *PersonList) *PersonList
- func (s *Stats) AvgMarriageAge(personList *PersonList) float64
- func (s *Stats) BirthDays(personList *PersonList) *RankingList
- func (s *Stats) BirthMonths(personList *PersonList) *RankingList
- func (s *Stats) ChildrenCount(personList *PersonList) *RankingList
- func (s *Stats) DeadCount(personList *PersonList) int
- func (s *Stats) DeathAges(personList *PersonList) *RankingList
- func (s *Stats) DeathDays(personList *PersonList) *RankingList
- func (s *Stats) FemaleCount(personList *PersonList) int
- func (s *Stats) GetReferenceDate() time.Time
- func (s *Stats) LongestMarriages(personList *PersonList) *RankingList
- func (s *Stats) LongestName(personList *PersonList) *RankingList
- func (s *Stats) MaleCount(personList *PersonList) int
- func (s *Stats) MarriageAges(personList *PersonList) *RankingList
- func (s *Stats) MarriageDays(personList *PersonList) *RankingList
- func (s *Stats) MarriedCount(personList *PersonList) int
- func (s *Stats) MostCommonFirstNames(personList *PersonList) *RankingList
- func (s *Stats) MostCommonLastNames(personList *PersonList) *RankingList
- func (s *Stats) MultipleAncestors(personList *PersonList) *RankingList
- func (s *Stats) NewestBirths(personList *PersonList) *RankingList
- func (s *Stats) NonUniqueBirthdays(personList *PersonList) *RankingList
- func (s *Stats) NonUniqueNames(personList *PersonList) *RankingList
- func (s *Stats) Oldest(personList *PersonList) *RankingList
- func (s *Stats) OldestBirths(personList *PersonList) *RankingList
- func (s *Stats) ShortestName(personList *PersonList) *RankingList
- func (s *Stats) TotalAgeLiving(personList *PersonList) int64
- func (s *Stats) UniqueFirstNames(personList *PersonList) *RankingList
- type YamlDatabase
Constants ¶
const GenerationsNone = -1
const GenerationsUnlimited = 1000
Variables ¶
This section is empty.
Functions ¶
func FourFourYearIDFunc ¶
func GetFourFourBirthNameID ¶
func GetFourFourYearID ¶
func GetLastFirstNameID ¶
func GetLifeAge ¶
GetLifeAge returns the minimal age
func RenderGenealogytree ¶
func RenderGenealogytree(p Person, o RenderTreeOptions) ([]byte, error)
func RenderParentSubtree ¶
func RenderParentSubtree(p Person, o RenderTreeOptions, headless bool) ([]byte, error)
func RenderTemplateFile ¶
func SplitPersons ¶
func SplitPersons(personList *PersonList, split Person) (younger PersonList, older PersonList)
func TemplateLatexifyFunc ¶
Types ¶
type AbsoluteLevel ¶
type AbsoluteLevel struct {
Index int `yaml:"index,omitempty"`
Color LevelColor `yaml:"color,omitempty"`
BoxOptions LevelBoxOptions `yaml:"box-options,omitempty"`
Options LevelOptions `yaml:"options,omitempty"`
}
func (*AbsoluteLevel) Equals ¶
func (l *AbsoluteLevel) Equals(other AbsoluteLevel) bool
func (*AbsoluteLevel) GetBoxOptions ¶
func (l *AbsoluteLevel) GetBoxOptions() LevelBoxOptions
func (*AbsoluteLevel) GetColor ¶
func (l *AbsoluteLevel) GetColor() LevelColor
func (*AbsoluteLevel) GetOptions ¶
func (l *AbsoluteLevel) GetOptions() LevelOptions
func (*AbsoluteLevel) IsChildLevel ¶
func (l *AbsoluteLevel) IsChildLevel(probandLevel int) bool
func (*AbsoluteLevel) IsParentLevel ¶
func (l *AbsoluteLevel) IsParentLevel(probandLevel int) bool
func (*AbsoluteLevel) IsProbandLevel ¶
func (l *AbsoluteLevel) IsProbandLevel(probandLevel int) bool
func (*AbsoluteLevel) SetBoxOptions ¶
func (l *AbsoluteLevel) SetBoxOptions(lb LevelBoxOptions)
func (*AbsoluteLevel) SetColor ¶
func (l *AbsoluteLevel) SetColor(lc LevelColor)
func (*AbsoluteLevel) SetOptions ¶
func (l *AbsoluteLevel) SetOptions(lb LevelOptions)
type AttributePersons ¶
type AttributePersons struct {
Attribute string
Persons *PersonList
}
type BiographyElement ¶
type BiographyElement struct {
Text string `yaml:",omitempty"`
Sources ReferenceList `yaml:",omitempty"`
}
type Comment ¶
type Comment struct {
Text string `yaml:",omitempty"`
Sources ReferenceList `yaml:",omitempty"`
}
type DatePlace ¶
type DatePlace struct {
Location `yaml:",inline,omitempty"`
// need to support things like "before 1932" here
Date string `yaml:",omitempty"`
DateSources ReferenceList `yaml:"date_sources,omitempty"`
}
func (DatePlace) GetAgeBegin ¶
type FlatPerson ¶
type FlatPerson struct {
Dummy bool `yaml:"-"`
ID string `yaml:",omitempty"`
UUID string `yaml:",omitempty"`
ChildNumber *uint `yaml:"child_number,omitempty"`
RelationsCount *uint `yaml:"relations_count,omitempty"`
Name Name `yaml:",omitempty"`
Gender string `yaml:",omitempty"`
Birth DatePlace `yaml:",omitempty"`
Baptism DatePlace `yaml:",omitempty"`
SaintsDay SaintsDay `yaml:"saintsday,omitempty"`
Death DatePlace `yaml:",omitempty"`
Dead *bool `yaml:",omitempty"`
Burial DatePlace `yaml:",omitempty"`
Mom string `yaml:",omitempty"`
Dad string `yaml:",omitempty"`
Partners []FlatRelationship `yaml:",omitempty"`
Attributes []string `yaml:",omitempty"`
ImageFilename string `yaml:"image,omitempty"`
Residences []Residence `yaml:",omitempty"`
Jobs []Job `yaml:",omitempty"`
Comments []Comment `yaml:",omitempty"`
BiographyElements []BiographyElement `yaml:"biography,omitempty"`
Sources ReferenceList `yaml:"sources,omitempty"`
GenderSources ReferenceList `yaml:"gender-sources,omitempty"`
Database *MemoryDatabase `yaml:"-"`
// contains filtered or unexported fields
}
func NewDummyFlatPerson ¶
func NewDummyFlatPerson() *FlatPerson
func (*FlatPerson) AddAttribute ¶
func (d *FlatPerson) AddAttribute(attr string)
func (*FlatPerson) AddBiographyElement ¶
func (d *FlatPerson) AddBiographyElement(biographyElement BiographyElement)
func (*FlatPerson) AddComment ¶
func (d *FlatPerson) AddComment(comment Comment)
func (*FlatPerson) AddJob ¶
func (d *FlatPerson) AddJob(job Job)
func (*FlatPerson) AddResidence ¶
func (d *FlatPerson) AddResidence(residence Residence)
func (*FlatPerson) AddTreePositionID ¶
func (d *FlatPerson) AddTreePositionID(ID string) Person
func (*FlatPerson) ClearTreePositionIDs ¶
func (d *FlatPerson) ClearTreePositionIDs() Person
func (*FlatPerson) Copy ¶
func (d *FlatPerson) Copy() Person
func (*FlatPerson) Equals ¶
func (d *FlatPerson) Equals(p2 Person) bool
func (*FlatPerson) GetAttributes ¶
func (d *FlatPerson) GetAttributes() []string
func (*FlatPerson) GetBaptism ¶
func (d *FlatPerson) GetBaptism() DatePlace
func (*FlatPerson) GetBestID ¶
func (d *FlatPerson) GetBestID() string
func (*FlatPerson) GetBiographyElements ¶
func (d *FlatPerson) GetBiographyElements() []BiographyElement
func (*FlatPerson) GetBirth ¶
func (d *FlatPerson) GetBirth() DatePlace
func (*FlatPerson) GetBurial ¶
func (d *FlatPerson) GetBurial() DatePlace
func (*FlatPerson) GetChildNumber ¶
func (d *FlatPerson) GetChildNumber() *uint
func (*FlatPerson) GetChildren ¶
func (d *FlatPerson) GetChildren() (*PersonList, error)
func (*FlatPerson) GetChildrenCount ¶
func (d *FlatPerson) GetChildrenCount() int
func (*FlatPerson) GetChildrenParents ¶
func (d *FlatPerson) GetChildrenParents() (*PersonList, error)
func (*FlatPerson) GetChildrenWith ¶
func (d *FlatPerson) GetChildrenWith(partner Person) (*PersonList, error)
func (*FlatPerson) GetComments ¶
func (d *FlatPerson) GetComments() []Comment
func (*FlatPerson) GetDad ¶
func (d *FlatPerson) GetDad() (Person, error)
func (*FlatPerson) GetDeadState ¶
func (d *FlatPerson) GetDeadState() *bool
func (*FlatPerson) GetDeath ¶
func (d *FlatPerson) GetDeath() DatePlace
func (*FlatPerson) GetDeathAge ¶
func (d *FlatPerson) GetDeathAge() int
func (*FlatPerson) GetGender ¶
func (d *FlatPerson) GetGender() Gender
func (*FlatPerson) GetGenderSources ¶
func (d *FlatPerson) GetGenderSources() ReferenceList
func (*FlatPerson) GetID ¶
func (d *FlatPerson) GetID() string
func (*FlatPerson) GetImageFilename ¶
func (d *FlatPerson) GetImageFilename() string
func (*FlatPerson) GetJobs ¶
func (d *FlatPerson) GetJobs() []Job
func (*FlatPerson) GetMainTreePositionID ¶
func (d *FlatPerson) GetMainTreePositionID() string
func (*FlatPerson) GetMom ¶
func (d *FlatPerson) GetMom() (Person, error)
func (*FlatPerson) GetName ¶
func (d *FlatPerson) GetName() Name
func (*FlatPerson) GetPartners ¶
func (d *FlatPerson) GetPartners() (*PersonList, error)
func (*FlatPerson) GetRawDad ¶
func (d *FlatPerson) GetRawDad() string
func (*FlatPerson) GetRawMom ¶
func (d *FlatPerson) GetRawMom() string
func (*FlatPerson) GetRelationsCount ¶
func (d *FlatPerson) GetRelationsCount() *uint
func (*FlatPerson) GetRelationshipWith ¶
func (d *FlatPerson) GetRelationshipWith(partner Person) Relationship
func (*FlatPerson) GetRelationships ¶
func (d *FlatPerson) GetRelationships() []Relationship
func (*FlatPerson) GetResidences ¶
func (d *FlatPerson) GetResidences() []Residence
func (*FlatPerson) GetSaintsDay ¶
func (d *FlatPerson) GetSaintsDay() SaintsDay
func (*FlatPerson) GetSiblings ¶
func (d *FlatPerson) GetSiblings() (*SiblingList, error)
func (*FlatPerson) GetSources ¶
func (d *FlatPerson) GetSources() ReferenceList
func (*FlatPerson) GetTreePositionIDs ¶
func (d *FlatPerson) GetTreePositionIDs() []string
func (*FlatPerson) GetUUID ¶
func (d *FlatPerson) GetUUID() string
func (*FlatPerson) HasChildrenCount ¶
func (d *FlatPerson) HasChildrenCount() bool
func (*FlatPerson) IsDummy ¶
func (d *FlatPerson) IsDummy() bool
func (*FlatPerson) IsEmpty ¶
func (d *FlatPerson) IsEmpty() bool
func (*FlatPerson) IsSpitzahn ¶
func (d *FlatPerson) IsSpitzahn() bool
func (*FlatPerson) IsStopPerson ¶
func (d *FlatPerson) IsStopPerson() bool
func (*FlatPerson) MatchesIDUUID ¶
func (d *FlatPerson) MatchesIDUUID(idUUIDSearches ...string) bool
func (*FlatPerson) MatchesSearch ¶
func (d *FlatPerson) MatchesSearch(search string) bool
func (*FlatPerson) SetBiographyElements ¶
func (d *FlatPerson) SetBiographyElements(biographyElements []BiographyElement)
func (*FlatPerson) SetChildNumber ¶
func (d *FlatPerson) SetChildNumber(childNumber *uint)
func (*FlatPerson) SetComments ¶
func (d *FlatPerson) SetComments(comments []Comment)
func (*FlatPerson) SetID ¶
func (d *FlatPerson) SetID(id string)
func (*FlatPerson) SetImageFilename ¶
func (d *FlatPerson) SetImageFilename(filename string)
func (*FlatPerson) SetJobs ¶
func (d *FlatPerson) SetJobs(jobs []Job)
func (*FlatPerson) SetRawDad ¶
func (d *FlatPerson) SetRawDad(dad string)
func (*FlatPerson) SetRawMom ¶
func (d *FlatPerson) SetRawMom(mom string)
func (*FlatPerson) SetRelationsCount ¶
func (d *FlatPerson) SetRelationsCount(relationsCount *uint)
func (*FlatPerson) SetResidences ¶
func (d *FlatPerson) SetResidences(residences []Residence)
func (*FlatPerson) SetStopPerson ¶
func (d *FlatPerson) SetStopPerson(value bool)
func (FlatPerson) String ¶
func (d FlatPerson) String() string
type FlatRelationship ¶
type FlatRelationship struct {
PartnerID string `yaml:"partner_id,omitempty"`
Index int `yaml:"index,omitempty"`
Engagement DatePlace `yaml:"engagement,omitempty"`
Marriage DatePlace `yaml:"marriage,omitempty"`
MarriageReligious DatePlace `yaml:"marriage_religious,omitempty"`
Divorce DatePlace `yaml:"divorce,omitempty"`
ChildrenCount *uint `yaml:"children_count,omitempty"`
Person FlatPerson `yaml:"-"`
}
func (FlatRelationship) GetChildrenCount ¶
func (f FlatRelationship) GetChildrenCount() *uint
func (FlatRelationship) GetDivorce ¶
func (f FlatRelationship) GetDivorce() *DatePlace
func (FlatRelationship) GetEngagement ¶
func (f FlatRelationship) GetEngagement() *DatePlace
func (FlatRelationship) GetEngagementDuration ¶
func (FlatRelationship) GetIndex ¶
func (f FlatRelationship) GetIndex() int
func (FlatRelationship) GetMarriage ¶
func (f FlatRelationship) GetMarriage() *DatePlace
func (FlatRelationship) GetMarriageDuration ¶
func (FlatRelationship) GetMarriageReligious ¶
func (f FlatRelationship) GetMarriageReligious() *DatePlace
func (FlatRelationship) GetMarriageReligiousDuration ¶
func (FlatRelationship) GetPartner ¶
func (f FlatRelationship) GetPartner() (Person, error)
func (FlatRelationship) GetPartnerOrDummy ¶
func (f FlatRelationship) GetPartnerOrDummy() Person
func (FlatRelationship) HasChildrenCount ¶
func (f FlatRelationship) HasChildrenCount() bool
func (*FlatRelationship) SetChildrenCount ¶
func (f *FlatRelationship) SetChildrenCount(childrenCount *uint)
type FootnoteContainer ¶
type FootnoteContainer struct {
// contains filtered or unexported fields
}
func NewFootnoteContainer ¶
func NewFootnoteContainer() *FootnoteContainer
func (*FootnoteContainer) Add ¶
func (f *FootnoteContainer) Add(key string) bool
func (*FootnoteContainer) GetLabel ¶
func (f *FootnoteContainer) GetLabel(search string) string
func (*FootnoteContainer) GetLabelFor ¶
func (f *FootnoteContainer) GetLabelFor(input string) string
func (*FootnoteContainer) Has ¶
func (f *FootnoteContainer) Has(search string) bool
type Gender ¶
type Gender int8
Gender x ENUM( unknown male female )
func ParseGender ¶
ParseGender attempts to convert a string to a Gender
type GenderOrder ¶
type GenderOrder int
ENUM(
MaleFirst = 1 FemaleFirst
const ( // GenderOrderMaleFirst is a GenderOrder of type MaleFirst GenderOrderMaleFirst GenderOrder = iota + 1 // GenderOrderFemaleFirst is a GenderOrder of type FemaleFirst GenderOrderFemaleFirst )
func ParseGenderOrder ¶
func ParseGenderOrder(name string) (GenderOrder, error)
ParseGenderOrder attempts to convert a string to a GenderOrder
func (GenderOrder) String ¶
func (x GenderOrder) String() string
String implements the Stringer interface.
type GraphType ¶
type GraphType int
ENUM(
parent = 1 child sandclock
func ParseGraphType ¶
ParseGraphType attempts to convert a string to a GraphType
type Job ¶
type Job struct {
Type string `yaml:",omitempty"`
Company string `yaml:",omitempty"`
Place string `yaml:",omitempty"`
From string `yaml:",omitempty"`
To string `yaml:",omitempty"`
DateSources ReferenceList `yaml:"date-sources,omitempty"`
Sources ReferenceList `yaml:",omitempty"`
}
type LastnamePolicy ¶
type LastnamePolicy int
ENUM(
Birth = 1 Current CurrentAndBirth
const ( // LastnamePolicyBirth is a LastnamePolicy of type Birth LastnamePolicyBirth LastnamePolicy = iota + 1 // LastnamePolicyCurrent is a LastnamePolicy of type Current LastnamePolicyCurrent // LastnamePolicyCurrentAndBirth is a LastnamePolicy of type CurrentAndBirth LastnamePolicyCurrentAndBirth )
func ParseLastnamePolicy ¶
func ParseLastnamePolicy(name string) (LastnamePolicy, error)
ParseLastnamePolicy attempts to convert a string to a LastnamePolicy
func (LastnamePolicy) String ¶
func (x LastnamePolicy) String() string
String implements the Stringer interface.
type Level ¶
type Level interface {
GetColor() LevelColor
GetBoxOptions() LevelBoxOptions
GetOptions() LevelOptions
SetColor(c LevelColor)
SetBoxOptions(b LevelBoxOptions)
SetOptions(b LevelOptions)
}
func MergeWithBase ¶
type LevelBoxOptions ¶
type LevelBoxOptions struct {
Main string `yaml:"main,omitempty"`
Leaf string `yaml:"leaf,omitempty"`
}
func (*LevelBoxOptions) Equals ¶
func (lo *LevelBoxOptions) Equals(other LevelBoxOptions) bool
func (*LevelBoxOptions) IsEmpty ¶
func (lo *LevelBoxOptions) IsEmpty() bool
func (*LevelBoxOptions) Merge ¶
func (lo *LevelBoxOptions) Merge(inheritedOpts LevelBoxOptions) *LevelBoxOptions
Merge does append!
type LevelColor ¶
func (*LevelColor) Equals ¶
func (lc *LevelColor) Equals(other LevelColor) bool
func (*LevelColor) IsEmpty ¶
func (lc *LevelColor) IsEmpty() bool
func (*LevelColor) MergeWithBase ¶
func (lc *LevelColor) MergeWithBase(lc2 *LevelColor) *LevelColor
merge with default
func (*LevelColor) OverwriteWith ¶
func (lc *LevelColor) OverwriteWith(lc2 *LevelColor) *LevelColor
overwrite
type LevelConfig ¶
type LevelConfig struct {
Absolute []AbsoluteLevel `yaml:"absolute,omitempty"`
Relative []RelativeLevel `yaml:"relative,omitempty"`
// globals
Color LevelColor `yaml:"color,omitempty"`
BoxOptions LevelBoxOptions `yaml:"box-options,omitempty"`
Options LevelOptions `yaml:"options,omitempty"`
Themes []string `yaml:"themes,omitempty"`
// generated
Combined []AbsoluteLevel `yaml:"-"`
}
func (*LevelConfig) AddDefaultLevels ¶
func (l *LevelConfig) AddDefaultLevels(from, to int) *LevelConfig
func (*LevelConfig) Combine ¶
func (l *LevelConfig) Combine(probandLevel int)
func (*LevelConfig) Inherit ¶
func (l *LevelConfig) Inherit(probandLevel int, baseConfig LevelConfig) *LevelConfig
func (*LevelConfig) SetGlobals ¶
func (l *LevelConfig) SetGlobals() *LevelConfig
type LevelOptions ¶
type LevelOptions string
func (*LevelOptions) Merge ¶
func (lo *LevelOptions) Merge(inheritedOpts LevelOptions) *LevelOptions
type LineageContainer ¶
type LineageContainer struct {
// contains filtered or unexported fields
}
func NewLineageContainer ¶
func NewLineageContainer() *LineageContainer
func (*LineageContainer) Add ¶
func (l *LineageContainer) Add(ID, treePositionID string, personList PersonList) *LineageContainer
Add adds two entries. One with the key, one with the TreePositionID that is calculated on the fly
func (*LineageContainer) AddWithBase ¶
func (l *LineageContainer) AddWithBase(ID, treePositionID, baseID string, person Person) *LineageContainer
func (*LineageContainer) Get ¶
func (l *LineageContainer) Get(ID string) *PersonList
func (*LineageContainer) String ¶
func (l *LineageContainer) String() string
type Location ¶
type Location struct {
City string `yaml:",omitempty"`
Place string `yaml:",omitempty"`
Country string `yaml:",omitempty"`
CitySources ReferenceList `yaml:"city_sources,omitempty"`
PlaceSources ReferenceList `yaml:"place_sources,omitempty"`
CountrySources ReferenceList `yaml:"country_sources,omitempty"`
Sources ReferenceList `yaml:",omitempty"`
}
type MemoryDatabase ¶
type MemoryDatabase struct {
Persons []*FlatPerson
Sources []Source // TODO Familybook sollte Source heißen und Source eher Reference
// contains filtered or unexported fields
}
func LoadDatabases ¶
func LoadDatabases(paths []string, baseDir string) (*MemoryDatabase, error)
func NewMemoryDatabase ¶
func NewMemoryDatabase() *MemoryDatabase
func (MemoryDatabase) Anonymize ¶
func (y MemoryDatabase) Anonymize()
func (*MemoryDatabase) MakeIDs ¶
func (y *MemoryDatabase) MakeIDs(f func(p Person, d Database) error) error
func (*MemoryDatabase) ParseYamlFile ¶
func (y *MemoryDatabase) ParseYamlFile(filename string) error
func (*MemoryDatabase) WriteYamlFile ¶
func (y *MemoryDatabase) WriteYamlFile(filename string) error
type Name ¶
type Name struct {
Title string `yaml:",omitempty"`
First []string `yaml:",omitempty"`
// If the used first name is different from the first element in the .First slice, it can be set using .Used
Used string `yaml:",omitempty"`
Last string `yaml:",omitempty"`
Birth string `yaml:",omitempty"`
Alias string `yaml:",omitempty"`
Nick string `yaml:",omitempty"`
Sources ReferenceList `yaml:",omitempty"`
}
func (Name) FormatFull ¶
FormatFull displays the full name, firstname before lastname
func (Name) FormatFullInverse ¶
FormatFullInverse displays the full name, lastname before firstname
func (Name) FormatFullNoBirth ¶
FormatFullNoBirth displays the full name, firstname before lastname, excluding birth name
func (Name) FormatFullNoMiddle ¶
FormatFullNoMiddle displays the full name, firstname before lastname, without middlename(s)
func (Name) FormatFullNoMiddleNoBirth ¶
FormatFullNoMiddleNoBirth displays the full name, firstname before lastname, without middlename(s), excluding birth name
func (Name) GetUsedFirst ¶
GetUsedFirst returns the used name if it is given, the first of the first names otherwise
type NodeType ¶
type NodeType int
ENUM(
g = 1 p c
func ParseNodeType ¶
ParseNodeType attempts to convert a string to a NodeType
type PartnerChildren ¶
type PartnerChildren struct {
Partner Person
Children *PersonList
}
type Person ¶
type Person interface {
Equals(p2 Person) bool
SetID(id string)
GetID() string
GetUUID() string
GetBestID() string
GetGender() Gender
MatchesIDUUID(idUUIDSearches ...string) bool
MatchesSearch(search string) bool
GetChildNumber() *uint
SetChildNumber(childNumber *uint)
GetRelationsCount() *uint
SetRelationsCount(relationsCount *uint)
GetName() Name
GetBirth() DatePlace
GetBaptism() DatePlace
GetSaintsDay() SaintsDay
GetDeath() DatePlace
GetDeadState() *bool
// GetAge returns the age in years at the given point of time. -1 iff the age can't be determined.
GetAge(now time.Time) int
// GetDeathAge returns the age in years when the person died. -1 iff the age can't be determined.
GetDeathAge() int
GetBurial() DatePlace
// GetChildren returns all children of this person
GetChildren() (*PersonList, error)
HasChildrenCount() bool
GetChildrenCount() int
GetRawMom() string
GetMom() (Person, error)
SetRawMom(string)
GetRawDad() string
GetDad() (Person, error)
SetRawDad(string)
GetSiblings() (*SiblingList, error)
GetRelationships() []Relationship
GetRelationshipWith(partner Person) Relationship
// GetPartners returns the list partners that are known for this person
// A partner is a person that
// - has been married with this person for any given moment in the past
// OR
// - had at least one child with this partner for any given moment in the past
GetPartners() (*PersonList, error)
// GetChildrenWith returns the list of children of this person with a given partner
GetChildrenWith(partner Person) (*PersonList, error)
// GetChildrenParents returns the list partners that person has children with (possibly including `nil` iff there is children where no other parent is known)
GetChildrenParents() (*PersonList, error)
GetAttributes() []string
AddAttribute(attr string)
GetImageFilename() string
SetImageFilename(filename string)
GetResidences() []Residence
AddResidence(residence Residence)
SetResidences(residences []Residence)
GetJobs() []Job
SetJobs(jobs []Job)
AddJob(job Job)
GetBiographyElements() []BiographyElement
AddBiographyElement(biographyElement BiographyElement)
SetBiographyElements(biographyElements []BiographyElement)
GetComments() []Comment
AddComment(comment Comment)
SetComments(comments []Comment)
SetStopPerson(value bool)
IsStopPerson() bool
IsDummy() bool
IsEmpty() bool
IsAlive(referenceTime time.Time) bool
IsSpitzahn() bool
GetTreePositionIDs() []string
GetMainTreePositionID() string
AddTreePositionID(ID string) Person
ClearTreePositionIDs() Person
// source management
GetSources() ReferenceList
GetGenderSources() ReferenceList
Copy() Person
String() string
}
Person interface
type PersonList ¶
type PersonList struct {
// contains filtered or unexported fields
}
PersonList is a model for collection of persons
func NewPersonList ¶
func NewPersonList() PersonList
func NewPersonListByIDs ¶
func NewPersonListByIDs(database Database, IDs []string) (PersonList, error)
func NewPersonListWithDatabase ¶
func NewPersonListWithDatabase(database Database) PersonList
func (*PersonList) AddChildren ¶
func (p *PersonList) AddChildren() (*PersonList, error)
func (*PersonList) AddList ¶
func (p *PersonList) AddList(personList *PersonList) *PersonList
func (*PersonList) AddParents ¶
func (p *PersonList) AddParents() (*PersonList, error)
func (*PersonList) AddPerson ¶
func (p *PersonList) AddPerson(person Person) *PersonList
func (*PersonList) AddSlice ¶
func (p *PersonList) AddSlice(persons []Person) *PersonList
func (*PersonList) Contains ¶
func (p *PersonList) Contains(person Person) bool
func (*PersonList) Count ¶
func (p *PersonList) Count() int
func (*PersonList) Diff ¶
func (p *PersonList) Diff(otherList *PersonList) (*PersonList, error)
func (*PersonList) Exclude ¶
func (p *PersonList) Exclude(persons ...Person)
func (*PersonList) ExcludeList ¶
func (p *PersonList) ExcludeList(persons *PersonList)
func (*PersonList) GetAttributes ¶
func (p *PersonList) GetAttributes() []AttributePersons
func (*PersonList) GetChildren ¶
func (p *PersonList) GetChildren() (PersonList, error)
func (*PersonList) GetFiltered ¶
func (p *PersonList) GetFiltered(validationFunc func(p Person) bool) *PersonList
func (*PersonList) GetParents ¶
func (p *PersonList) GetParents() (PersonList, error)
func (*PersonList) GetPartners ¶
func (p *PersonList) GetPartners() (PersonList, error)
func (*PersonList) GetPersons ¶
func (p *PersonList) GetPersons() []Person
func (*PersonList) GetTreePositionID ¶
func (p *PersonList) GetTreePositionID() string
GetTreePositionID calculates and returns the TreePositionID. The ID is created by concatenating all IDs in the PersonList with "-".
func (*PersonList) GetTreePositionIDWith ¶
func (p *PersonList) GetTreePositionIDWith(person Person) string
func (*PersonList) GetWithMergedTreePositionIDs ¶
func (p *PersonList) GetWithMergedTreePositionIDs() *PersonList
func (*PersonList) HasSameElements ¶
func (p *PersonList) HasSameElements(other *PersonList) bool
func (*PersonList) Invert ¶
func (p *PersonList) Invert() *PersonList
func (*PersonList) Len ¶
func (p *PersonList) Len() int
func (*PersonList) Less ¶
func (p *PersonList) Less(i, j int) bool
func (*PersonList) MergeTreePositions ¶
func (p *PersonList) MergeTreePositions(other *PersonList) *PersonList
func (*PersonList) Remove ¶
func (p *PersonList) Remove(person Person) *PersonList
func (*PersonList) RemoveDuplicatesByBestID ¶
func (p *PersonList) RemoveDuplicatesByBestID() *PersonList
func (*PersonList) SortPersons ¶
func (p *PersonList) SortPersons(sortFunc func(a, b Person) bool) *PersonList
func (*PersonList) Swap ¶
func (p *PersonList) Swap(i, j int)
type RankingItem ¶
type RankingItem struct {
Rank int
Value interface{}
RankingValue interface{}
Persons *PersonList
}
type RankingList ¶
type RankingList struct {
RankingItems []RankingItem
Comparator func(a, b RankingItem) bool
// contains filtered or unexported fields
}
func NewRankingList ¶
func NewRankingList() *RankingList
func (*RankingList) AddItem ¶
func (r *RankingList) AddItem(item RankingItem) *RankingList
func (*RankingList) GetItems ¶
func (r *RankingList) GetItems() []RankingItem
func (*RankingList) GetTop ¶
func (r *RankingList) GetTop(i int) []RankingItem
func (*RankingList) Len ¶
func (r *RankingList) Len() int
func (*RankingList) Less ¶
func (r *RankingList) Less(i, j int) bool
func (*RankingList) Lock ¶
func (r *RankingList) Lock()
func (*RankingList) Swap ¶
func (r *RankingList) Swap(i, j int)
func (*RankingList) Unlock ¶
func (r *RankingList) Unlock()
type ReferenceEntry ¶
type ReferenceList ¶
type ReferenceList []Reference
type ReferencesContainer ¶
type ReferencesContainer struct {
// contains filtered or unexported fields
}
func NewReferencesContainer ¶
func NewReferencesContainer() *ReferencesContainer
func (*ReferencesContainer) Add ¶
func (f *ReferencesContainer) Add(source Reference, isMainSource bool) string
Add returns the key given
func (*ReferencesContainer) GetKey ¶
func (f *ReferencesContainer) GetKey(source Reference) string
func (*ReferencesContainer) GetKeyByIndex ¶
func (f *ReferencesContainer) GetKeyByIndex(i int) string
func (*ReferencesContainer) GetLabel ¶
func (f *ReferencesContainer) GetLabel(search Reference) string
func (*ReferencesContainer) GetLabelFor ¶
func (f *ReferencesContainer) GetLabelFor(source Reference) string
func (*ReferencesContainer) GetMainReferences ¶
func (f *ReferencesContainer) GetMainReferences() []ReferenceEntry
func (*ReferencesContainer) GetNonMainReferences ¶
func (f *ReferencesContainer) GetNonMainReferences() []ReferenceEntry
func (*ReferencesContainer) GetSources ¶
func (f *ReferencesContainer) GetSources() []ReferenceEntry
func (*ReferencesContainer) Has ¶
func (f *ReferencesContainer) Has(search Reference) bool
func (*ReferencesContainer) SetLabelBase ¶
func (f *ReferencesContainer) SetLabelBase(base string)
type Relationship ¶
type Relationship interface {
GetIndex() int
GetPartner() (Person, error)
GetPartnerOrDummy() Person
GetEngagement() *DatePlace
GetMarriage() *DatePlace
GetMarriageReligious() *DatePlace
GetDivorce() *DatePlace
SetChildrenCount(childrenCount *uint)
GetChildrenCount() *uint
HasChildrenCount() bool
GetEngagementDuration(Person, time.Time) timecalc.Duration
GetMarriageDuration(Person, time.Time) timecalc.Duration
GetMarriageReligiousDuration(Person, time.Time) timecalc.Duration
}
type RelativeLevel ¶
type RelativeLevel struct {
Index int
Color LevelColor
BoxOptions LevelBoxOptions `yaml:"box-options,omitempty"`
Options LevelOptions `yaml:"options,omitempty"`
}
func (*RelativeLevel) GetBoxOptions ¶
func (l *RelativeLevel) GetBoxOptions() LevelBoxOptions
func (*RelativeLevel) GetColor ¶
func (l *RelativeLevel) GetColor() LevelColor
func (*RelativeLevel) GetOptions ¶
func (l *RelativeLevel) GetOptions() LevelOptions
func (*RelativeLevel) SetBoxOptions ¶
func (l *RelativeLevel) SetBoxOptions(lb LevelBoxOptions)
func (*RelativeLevel) SetColor ¶
func (l *RelativeLevel) SetColor(lc LevelColor)
func (*RelativeLevel) SetOptions ¶
func (l *RelativeLevel) SetOptions(lb LevelOptions)
type RenderPersonOptions ¶
type RenderPersonOptions struct {
NodeType NodeType
TemplateFilename string
Date time.Time
// Display filter
HideRootNodeHighlighting bool `yaml:"hide-root-node-highlighting,omitempty"`
LastnamePolicy LastnamePolicy `yaml:"lastname-policy,omitempty"`
// Output filter
HideID bool `yaml:"hide-id,omitempty"`
HideAttributes []string `yaml:"hide-attributes,omitempty"`
HideGender bool `yaml:"hide-gender,omitempty"`
HideName bool `yaml:"hide-name,omitempty"`
HideBirth bool `yaml:"hide-birth,omitempty"`
ShowAge bool `yaml:"show-age,omitempty"`
HideBaptism bool `yaml:"hide-baptism,omitempty"`
HideSaintsDay bool `yaml:"hide-saints-day,omitempty"`
HideDeath bool `yaml:"hide-death,omitempty"`
HideDeathAge bool `yaml:"hide-death-age,omitempty"`
HideBurial bool `yaml:"hide-burial,omitempty"`
HideImage bool `yaml:"hide-image,omitempty"`
HideJobs bool `yaml:"hide-jobs,omitempty"`
HideFloruit bool `yaml:"hide-floruit,omitempty"`
HideComment bool `yaml:"hide-comment,omitempty"`
HideEngagement bool `yaml:"hide-engagement,omitempty"`
HideMarriage bool `yaml:"hide-marriage,omitempty"`
HideMarriageAge bool `yaml:"hide-marriage-age,omitempty"`
HideMarriageReligious bool `yaml:"hide-marriage-religious,omitempty"`
HideMarriageReligiousAge bool `yaml:"hide-marriage-religious-age,omitempty"`
HideDivorce bool `yaml:"hide-divorce,omitempty"`
// special filters
HidePlaces bool `yaml:"hide-places,omitempty"`
HideMiddleNames bool `yaml:"hide-middle-names,omitempty"`
}
func (*RenderPersonOptions) HideAllData ¶
func (o *RenderPersonOptions) HideAllData()
func (*RenderPersonOptions) HideImageByLevel ¶
func (o *RenderPersonOptions) HideImageByLevel(treeOptions RenderTreeOptions, currentLevel int) *RenderPersonOptions
func (*RenderPersonOptions) SetDefaults ¶
func (o *RenderPersonOptions) SetDefaults() *RenderPersonOptions
type RenderTreeOptions ¶
type RenderTreeOptions struct {
RenderPersonOptions *RenderPersonOptions `yaml:"render-person-options,omitempty"`
TemplateFilenameTree string `yaml:"template-filename-tree,omitempty"`
TemplateFilenamePerson string `yaml:"template-filename-person,omitempty"`
TemplateFilenameParentTree string `yaml:"template-filename-parent-tree,omitempty"`
TemplateFilenameParentTreeHeadless string `yaml:"template-filename-parent-tree-headless,omitempty"`
TemplateFilenameChildTree string `yaml:"template-filename-child-tree,omitempty"`
TemplateFilenameUnionTree string `yaml:"template-filename-union-tree,omitempty"`
FailForIDLookup bool
GraphType GraphType
GenderOrder GenderOrder
// levels
Levels []AbsoluteLevel `yaml:"-"`
// Limits
IgnoreIDs []string `yaml:"ignore,omitempty"`
MaxParentGenerations int `yaml:"max-parent-generations,omitempty"`
MaxParentSiblingsGenerations int `yaml:"max-parent-siblings-generations,omitempty"`
MaxChildGenerations int `yaml:"max-child-generations,omitempty"`
MaxChildPartnersGenerations int `yaml:"max-child-partners-generations,omitempty"`
MinImageLevel *int `yaml:"min-image-level,omitempty"`
MaxImageLevel *int `yaml:"max-image-level,omitempty"`
HideFamilyIDs bool `yaml:"hide-family-ids,omitempty"`
AddPhantomChildForEmptyFamilies *bool `yaml:"add-phantom-child-for-empty-families,omitempty"`
// contains filtered or unexported fields
}
func (*RenderTreeOptions) SetDefaults ¶
func (o *RenderTreeOptions) SetDefaults() *RenderTreeOptions
type Residence ¶
type Residence struct {
CO string `yaml:"co,omitempty"`
Address string `yaml:",omitempty"`
ZipCode string `yaml:"zip-code,omitempty"`
City string `yaml:",omitempty"`
Place string `yaml:",omitempty"`
Country string `yaml:",omitempty"`
From string `yaml:",omitempty"`
To string `yaml:",omitempty"`
DateSources ReferenceList `yaml:"date-sources,omitempty"`
Sources ReferenceList `yaml:",omitempty"`
}
type SaintsDay ¶
type SaintsDay struct {
SourcedDate `yaml:",inline"`
Description string `yaml:",omitempty"`
}
type SiblingList ¶
type SiblingList struct {
Common *PersonList
WithMom []PartnerChildren
WithDad []PartnerChildren
}
type Source ¶
type Source struct {
ID string `yaml:",omitempty"`
Description string `yaml:",omitempty"`
PDF string `yaml:",omitempty"`
Pages string `yaml:",omitempty"`
Rotate int `yaml:",omitempty"`
}
Source is the definition of a material or digital source
type SourceEntry ¶
type SourcedDate ¶
type SourcedDate struct {
// need to support things like "before 1932" here
Date string `yaml:",omitempty"`
Sources ReferenceList `yaml:",omitempty"`
}
func (SourcedDate) Empty ¶
func (s SourcedDate) Empty() bool
type SourcesContainer ¶
type SourcesContainer struct {
// contains filtered or unexported fields
}
func NewSourcesContainer ¶
func NewSourcesContainer() *SourcesContainer
func (*SourcesContainer) Add ¶
func (f *SourcesContainer) Add(key string) string
Add returns the key given
func (*SourcesContainer) GetKey ¶
func (f *SourcesContainer) GetKey(text string) string
func (*SourcesContainer) GetKeyByIndex ¶
func (f *SourcesContainer) GetKeyByIndex(i int) string
func (*SourcesContainer) GetLabel ¶
func (f *SourcesContainer) GetLabel(search string) string
func (*SourcesContainer) GetLabelFor ¶
func (f *SourcesContainer) GetLabelFor(input string) string
func (*SourcesContainer) GetMainSource ¶
func (f *SourcesContainer) GetMainSource() SourceEntry
func (*SourcesContainer) GetNotes ¶
func (f *SourcesContainer) GetNotes() []SourceEntry
func (*SourcesContainer) Has ¶
func (f *SourcesContainer) Has(search string) bool
func (*SourcesContainer) SetLabelBase ¶
func (f *SourcesContainer) SetLabelBase(base string)
func (*SourcesContainer) SetMainSource ¶
func (f *SourcesContainer) SetMainSource(mainSource SourceEntry)
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
func (*Stats) AliveCount ¶
func (s *Stats) AliveCount(personList *PersonList) int
func (*Stats) AlivePersons ¶
func (s *Stats) AlivePersons(personList *PersonList) *PersonList
func (*Stats) AvgMarriageAge ¶
func (s *Stats) AvgMarriageAge(personList *PersonList) float64
func (*Stats) BirthDays ¶
func (s *Stats) BirthDays(personList *PersonList) *RankingList
func (*Stats) BirthMonths ¶
func (s *Stats) BirthMonths(personList *PersonList) *RankingList
func (*Stats) ChildrenCount ¶
func (s *Stats) ChildrenCount(personList *PersonList) *RankingList
func (*Stats) DeadCount ¶
func (s *Stats) DeadCount(personList *PersonList) int
func (*Stats) DeathAges ¶
func (s *Stats) DeathAges(personList *PersonList) *RankingList
func (*Stats) DeathDays ¶
func (s *Stats) DeathDays(personList *PersonList) *RankingList
func (*Stats) FemaleCount ¶
func (s *Stats) FemaleCount(personList *PersonList) int
func (*Stats) GetReferenceDate ¶
func (*Stats) LongestMarriages ¶
func (s *Stats) LongestMarriages(personList *PersonList) *RankingList
func (*Stats) LongestName ¶
func (s *Stats) LongestName(personList *PersonList) *RankingList
func (*Stats) MaleCount ¶
func (s *Stats) MaleCount(personList *PersonList) int
func (*Stats) MarriageAges ¶
func (s *Stats) MarriageAges(personList *PersonList) *RankingList
func (*Stats) MarriageDays ¶
func (s *Stats) MarriageDays(personList *PersonList) *RankingList
func (*Stats) MarriedCount ¶
func (s *Stats) MarriedCount(personList *PersonList) int
func (*Stats) MostCommonFirstNames ¶
func (s *Stats) MostCommonFirstNames(personList *PersonList) *RankingList
func (*Stats) MostCommonLastNames ¶
func (s *Stats) MostCommonLastNames(personList *PersonList) *RankingList
func (*Stats) MultipleAncestors ¶
func (s *Stats) MultipleAncestors(personList *PersonList) *RankingList
func (*Stats) NewestBirths ¶
func (s *Stats) NewestBirths(personList *PersonList) *RankingList
func (*Stats) NonUniqueBirthdays ¶
func (s *Stats) NonUniqueBirthdays(personList *PersonList) *RankingList
func (*Stats) NonUniqueNames ¶
func (s *Stats) NonUniqueNames(personList *PersonList) *RankingList
func (*Stats) Oldest ¶
func (s *Stats) Oldest(personList *PersonList) *RankingList
func (*Stats) OldestBirths ¶
func (s *Stats) OldestBirths(personList *PersonList) *RankingList
func (*Stats) ShortestName ¶
func (s *Stats) ShortestName(personList *PersonList) *RankingList
func (*Stats) TotalAgeLiving ¶
func (s *Stats) TotalAgeLiving(personList *PersonList) int64
func (*Stats) UniqueFirstNames ¶
func (s *Stats) UniqueFirstNames(personList *PersonList) *RankingList
type YamlDatabase ¶
type YamlDatabase struct {
Persons []*FlatPerson `yaml:",omitempty"`
Sources []Source `yaml:",omitempty"`
DefaultSources []Reference `yaml:"default-sources,omitempty"`
}
Source Files
¶
- database.go
- database_loading.go
- flat_person.go
- flat_relationship.go
- footnote_container.go
- generator.go
- generator_child_tree.go
- generator_parent_tree.go
- level.go
- lineage_container.go
- models.go
- models_enum.go
- name.go
- person.go
- person_list.go
- person_stats.go
- references_container.go
- relationship.go
- render_person_options.go
- render_person_options_enum.go
- render_tree_options.go
- render_tree_options_enum.go
- sibling_list.go
- sourcable_types.go
- sources_container.go
- stats.go

