gramps/src/plugins/all_events.py
Don Allingham 247e0020ed 2007-05-14 Don Allingham <don@gramps-project.org>
* src/DataViews/_PedigreeView.py: catch errors
	* src/DataViews/_RelationView.py: catch errors
	* src/ReportBase/_ReportDialog.py: catch errors
	* src/ReportBase/_SimpleAccess.py: fix marriage place/date values
	* src/Editors/_EditFamily.py: catch errors
	* src/DisplayTabs/_EmbeddedList.py: catch errors
	* src/plugins/FindDupes.py: catch errors
	* src/plugins/Verify.py: catch errors
	* src/AddMedia.py: fix scale_simple types
	* src/AutoComp.py: pylint fixes
	* src/ImgManip.py: pylint fixes
	* src/LdsUtils.py: new temple types
	* src/DbLoader.py: error types



svn: r8473
2007-05-15 04:17:12 +00:00

32 lines
942 B
Python

from ReportBase._SimpleAccess import SimpleAccess, by_date
from ReportBase._SimpleDoc import SimpleDoc
def run(database, document, person):
sa = SimpleAccess(database)
sd = SimpleDoc(document)
# get the personal events
event_list = sa.events(person)
# get the events of each family in which the person is
# a parent
for family in sa.parent_in(person):
event_list += sa.events(family)
# Sort the events by their date
event_list.sort(by_date)
# display the results
sd.title("Sorted events of %s" % sa.name(person))
sd.paragraph("")
sd.header1("Event Type\tEvent Date\tEvent Place")
for event in event_list:
sd.paragraph("%-12s\t%-12s\t%s" % (sa.event_type(event),
sa.event_date(event),
sa.event_place(event)))
sd.paragraph("Marriage %s" % sa.marriage_place(person))