Closed jorgechato closed 5 months ago
Looks like I was using the wrong approach. This is a working snippet:
func getNotes(gedcomFile *gedcom.Document, individual *gedcom.IndividualNode) {
for _, node := range individual.Nodes() {
var notes_list []string
if node.Tag().Is(gedcom.TagNote) {
notes_list := append(notes_list, node.String())
for _, note := range node.Nodes() {
notes_list = append(notes_list, note.String())
}
fmt.Println("---Notes---")
fmt.Println(strings.Join(notes_list, "\n"))
}
}
}
For gedcom
format exported from MacFamilyTree 10
the notes are references in the individual so this approach can't be use
Do we have a straight forward way to extract the Notes for each individual? Currently I'm using the following approach which is incomplete: