2004-08-23 Tim Waugh <twaugh@redhat.com>

* src/WriteGedcom.py (GedcomWriter.write_families): Write families
        in GRAMPS ID order for easier change tracking.


svn: r3479
This commit is contained in:
Tim Waugh 2004-08-22 23:11:30 +00:00
parent fe96a04e1d
commit b9c493f2af
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2004-08-23 Tim Waugh <twaugh@redhat.com>
* src/WriteGedcom.py (GedcomWriter.write_families): Write families
in GRAMPS ID order for easier change tracking.
2004-08-22 Tim Waugh <twaugh@redhat.com>
* src/WriteGedcom.py (GedcomWriter.export_data): Write individuals

View File

@ -746,10 +746,15 @@ class GedcomWriter:
def write_families(self):
nump = float(len(self.flist))
index = 0.0
for family_handle in self.flist.keys():
sorted = []
for family_handle in self.flist.keys ():
family = self.db.get_family_from_handle(family_handle)
tuple = (self.fid (family_handle), family_handle, family)
sorted.append (tuple)
sorted.sort ()
for (gramps_id, family_handle, family) in sorted:
father_alive = mother_alive = 0
self.writeln("0 @%s@ FAM" % self.fid(family_handle))
self.writeln("0 @%s@ FAM" % gramps_id)
self.frefn(family_handle)
person_handle = family.get_father_handle()
if person_handle != None and self.plist.has_key(person_handle):