2007-05-06 Don Allingham <don@gramps-project.org>

* src/DataViews/_PersonView.py: add quick report
	* src/GrampsDb/_GrampsDbBase.py: use NotImplementedError instead of assertion
	* src/ReportBase/_SimpleAccess.py: added functionality
	* src/RelLib/_MediaObject.py: comments
	* src/RelLib/_Person.py: remove @sort comment
	* src/RelLib/_BasicPrimaryObject.py: 
	* src/plugins/all_events.py: comments
	* src/glade/gramps.glade: clean up width
	* src/gramps_main.py: added docgen to the search path
	* src/docgen/TextBufDoc.py: Added interface



svn: r8439
This commit is contained in:
Don Allingham
2007-05-07 03:39:46 +00:00
parent be7b8d6c94
commit 6e065c407f
12 changed files with 528 additions and 261 deletions

29
src/plugins/all_events.py Normal file
View File

@@ -0,0 +1,29 @@
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)))