Getting description and notes from event

Hi all,
I’ve been a software developer for many years. At the moment programming in opentext exstream. Genealogy has always been a passion. Recently I started my own genealogy research company. Gramps has been very useful to me.
To get my head around programming in python and Gramps, I started adapting an add-on report.
Some things I managed to change, but now I got a bit stuck.
In the list of children of a family, I would like to add the description and (first) note of the baptism event.
Is there an example somewhere, where I could look?

Thank you very much,
Eugène Dubois

You can see in webreport/event.py

            # Narrative subsection
            notelist = event.get_note_list()
            notelist = self.display_note_list(notelist, Event)

The display_note_list can be found in webreport/basepage.py

        for notehandle in notelist:
            note = self.r_db.get_note_from_handle(notehandle)
            title = self._(note.type.xml_str())

You have another example in gen/plug/report/endnotes.py:

    for notehandle in note_list:
        note = db.get_note_from_handle(notehandle)
        contains_html = note.get_type() == NoteType.HTML_CODE
        doc.write_styled_note(note.get_styledtext(), note.get_format(), style,
                              contains_html=contains_html, links=links)
3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.