Documentation
¶
Overview ¶
Package gedcom provides a functions to parse GEDCOM files.
Index ¶
- type AddressDetail
- type AddressRecord
- type AssociationRecord
- type ChangeRecord
- type CitationRecord
- type DataRecord
- type Decoder
- type EventRecord
- type FamilyLinkRecord
- type FamilyRecord
- type FileRecord
- type Gedcom
- type Header
- type IndividualRecord
- type Line
- type MediaRecord
- type NameRecord
- type NoteRecord
- type ParsedName
- type PlaceRecord
- type RepositoryRecord
- type ScanErr
- type Scanner
- type SourceCallNumberRecord
- type SourceDataRecord
- type SourceEventRecord
- type SourceRecord
- type SourceRepositoryRecord
- type SubmissionRecord
- type SubmitterRecord
- type SystemRecord
- type Trailer
- type UserDefinedTag
- type UserReferenceRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressDetail ¶ added in v0.1.0
type AddressRecord ¶
type AddressRecord struct {
Address []*AddressDetail
Phone []string
Email []string // 5.5.1
Fax []string // 5.5.1
WWW []string // 5.5.1
}
See https://www.tamurajones.net/GEDCOMADDR.xhtml for very informative analysis of the ADDR structure
type AssociationRecord ¶ added in v0.0.4
type AssociationRecord struct {
Xref string
Relation string
Citation []*CitationRecord
Note []*NoteRecord
}
type ChangeRecord ¶ added in v0.0.4
type ChangeRecord struct {
Date string
Time string
Note []*NoteRecord
}
type CitationRecord ¶
type CitationRecord struct {
Source *SourceRecord
Page string
Data DataRecord
Quay string
Media []*MediaRecord
Note []*NoteRecord
UserDefined []UserDefinedTag
}
type DataRecord ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder reads and decodes GEDCOM objects from an input stream.
func NewDecoder ¶
NewDecoder returns a new decoder that reads r.
type EventRecord ¶
type EventRecord struct {
Tag string
Value string
Type string
Date string
Place PlaceRecord
Address AddressRecord
Age string
ResponsibleAgency string
ReligiousAffiliation string
Cause string
RestrictionNotice string // 5.5.1
ChildInFamily *FamilyRecord // link to parent family for birth events
AdoptedByParent string // for adoption event, one of HUSB,WIFE,BOTH
Citation []*CitationRecord
Media []*MediaRecord
Note []*NoteRecord
UserDefined []UserDefinedTag
}
type FamilyLinkRecord ¶
type FamilyLinkRecord struct {
Family *FamilyRecord
Type string
Note []*NoteRecord
}
type FamilyRecord ¶
type FamilyRecord struct {
Xref string
Husband *IndividualRecord
Wife *IndividualRecord
Child []*IndividualRecord
Event []*EventRecord
NumberOfChildren string
UserReference []*UserReferenceRecord
AutomatedRecordId string
Change ChangeRecord
Note []*NoteRecord
Citation []*CitationRecord
Media []*MediaRecord
UserDefined []UserDefinedTag
}
type FileRecord ¶ added in v0.0.4
type Gedcom ¶
type Gedcom struct {
Header *Header
Family []*FamilyRecord
Individual []*IndividualRecord
Media []*MediaRecord
Repository []*RepositoryRecord
Source []*SourceRecord
Submitter []*SubmitterRecord
Trailer *Trailer
UserDefined []UserDefinedTag
}
type Header ¶
type Header struct {
SourceSystem SystemRecord
Destination string
Date string
Time string
Submitter *SubmitterRecord
Submission *SubmissionRecord
Filename string
Copyright string
Version string
Form string
CharacterSet string
CharacterSetVersion string
Language string
Place PlaceRecord
Note string
UserDefined []UserDefinedTag
}
A Header contains information about the GEDCOM file.
type IndividualRecord ¶
type IndividualRecord struct {
Xref string
Name []*NameRecord
Sex string
Event []*EventRecord
Attribute []*EventRecord
Parents []*FamilyLinkRecord
Family []*FamilyLinkRecord
Submitter []*SubmitterRecord
Association []*AssociationRecord
PermanentRecordFileNumber string
AncestralFileNumber string
UserReference []*UserReferenceRecord
AutomatedRecordId string
Change ChangeRecord
Note []*NoteRecord
Citation []*CitationRecord
Media []*MediaRecord
UserDefined []UserDefinedTag
}
type Line ¶ added in v0.1.0
type MediaRecord ¶
type MediaRecord struct {
Xref string
File []*FileRecord
UserReference []*UserReferenceRecord
AutomatedRecordId string
Change ChangeRecord
Note []*NoteRecord
Citation []*CitationRecord
UserDefined []UserDefinedTag
}
type NameRecord ¶
type NameRecord struct {
Name string
Citation []*CitationRecord
Note []*NoteRecord
}
type NoteRecord ¶
type NoteRecord struct {
Note string
Citation []*CitationRecord
}
type ParsedName ¶ added in v0.0.4
func SplitPersonalName ¶ added in v0.0.4
func SplitPersonalName(name string) ParsedName
SplitPersonalName parses a name in the format "First Name /Surname/ suffix" into its components.
type PlaceRecord ¶
type PlaceRecord struct {
Name string
Citation []*CitationRecord
Note []*NoteRecord
}
type RepositoryRecord ¶
type RepositoryRecord struct {
Xref string
Name string
Address AddressRecord
Note []*NoteRecord
UserReference []*UserReferenceRecord
AutomatedRecordId string
Change ChangeRecord
}
type Scanner ¶ added in v0.1.0
type Scanner struct {
// contains filtered or unexported fields
}
A Scanner is a GEDCOM scanning state machine.
func NewScanner ¶ added in v0.1.0
func NewScanner(r io.RuneScanner) *Scanner
NewScanner creates a new Scanner ready for use.
func (*Scanner) Err ¶ added in v0.1.0
Err returns the first non-EOF error that was encountered by the Scanner.
type SourceCallNumberRecord ¶ added in v0.0.4
type SourceDataRecord ¶ added in v0.0.4
type SourceDataRecord struct {
Event []*SourceEventRecord
}
type SourceEventRecord ¶ added in v0.0.4
type SourceRecord ¶
type SourceRecord struct {
Xref string
Title string
Data *SourceDataRecord
Originator string
FiledBy string
PublicationFacts string
Text string
Repository *SourceRepositoryRecord
UserReference []*UserReferenceRecord
AutomatedRecordId string
Change ChangeRecord
Note []*NoteRecord
Media []*MediaRecord
UserDefined []UserDefinedTag
}
type SourceRepositoryRecord ¶ added in v0.0.4
type SourceRepositoryRecord struct {
Repository *RepositoryRecord
Note []*NoteRecord
CallNumber []*SourceCallNumberRecord
}
type SubmissionRecord ¶
type SubmissionRecord struct {
Xref string
}
type SubmitterRecord ¶
type SubmitterRecord struct {
Xref string
}
type SystemRecord ¶
type SystemRecord struct {
Xref string
Version string
ProductName string
BusinessName string
Address AddressRecord
SourceName string
SourceDate string
SourceCopyright string
UserDefined []UserDefinedTag
}
A SystemRecord contains information about the system that produced the GEDCOM.
type UserDefinedTag ¶ added in v0.0.4
type UserDefinedTag struct {
Tag string
Value string
Xref string
Level int
UserDefined []UserDefinedTag
}
A UserDefinedTag is a tag that is not defined in the GEDCOM specification but is included by the publisher of the data. In GEDCOM user defined tags must be prefixed with an underscore. This is preserved in the Tag field.