* src/ReadGedcom.py: grab description for birth and death events
* src/WriteGedcom.py: export description for birth and death events * example/gedcom/sample.ged: add test case svn: r4617
This commit is contained in:
parent
a4688d10ad
commit
1f25c6fd38
@ -1,3 +1,8 @@
|
||||
2005-05-18 Don Allingham <don@gramps-project.org>
|
||||
* src/ReadGedcom.py: grab description for birth and death events
|
||||
* src/WriteGedcom.py: export description for birth and death events
|
||||
* example/gedcom/sample.ged: add test case
|
||||
|
||||
2005-05-18 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/GrampsInMemDB.py: Emit the *-delete signals correctly.
|
||||
* src/GrampsDbBase.py: Emission of the *-update/*-add signals should not depend
|
||||
|
@ -62,7 +62,7 @@
|
||||
1 OBJE
|
||||
2 FROM jpeg
|
||||
2 FILE foo/O0.jpg
|
||||
1 BIRT
|
||||
1 BIRT Edwin Michael Smith's Birth event
|
||||
2 DATE 24 MAY 1961
|
||||
2 PLAC San Jose, Santa Clara Co., CA
|
||||
1 OCCU
|
||||
|
@ -1025,6 +1025,8 @@ class GedcomParser:
|
||||
self.person.add_address(addr)
|
||||
elif matches[1] == "BIRT":
|
||||
event = RelLib.Event()
|
||||
if matches[2]:
|
||||
event.set_description(matches[2])
|
||||
self.db.add_event(event, self.trans)
|
||||
if self.person.get_birth_handle():
|
||||
event.set_name("Alternate Birth")
|
||||
@ -1043,6 +1045,8 @@ class GedcomParser:
|
||||
self.db.commit_event(event, self.trans)
|
||||
elif matches[1] == "DEAT":
|
||||
event = RelLib.Event()
|
||||
if matches[2]:
|
||||
event.set_description(matches[2])
|
||||
self.db.add_event(event, self.trans)
|
||||
if self.person.get_death_handle():
|
||||
event.set_name("Alternate Death")
|
||||
|
@ -793,14 +793,20 @@ class GedcomWriter:
|
||||
birth = self.db.get_event_from_handle(birth_handle)
|
||||
if birth_handle and not (self.private and birth.get_privacy()):
|
||||
if not birth.get_date_object().is_empty() or birth.get_place_handle():
|
||||
self.writeln("1 BIRT")
|
||||
if birth.get_description() != "":
|
||||
self.writeln("1 BIRT %s" % birth.get_description())
|
||||
else:
|
||||
self.writeln("1 BIRT")
|
||||
self.dump_event_stats(birth)
|
||||
|
||||
death_handle = person.get_death_handle()
|
||||
death = self.db.get_event_from_handle(death_handle)
|
||||
if death_handle and not (self.private and death.get_privacy()):
|
||||
if not death.get_date_object().is_empty() or death.get_place_handle():
|
||||
self.writeln("1 DEAT")
|
||||
if birth.get_description() != "":
|
||||
self.writeln("1 DEAT %s" % death.get_description())
|
||||
else:
|
||||
self.writeln("1 DEAT")
|
||||
self.dump_event_stats(death)
|
||||
|
||||
ad = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user