* src/WriteGedcom.py (GedcomWriter.export_data): Write individuals

out in GRAMPS ID order.


svn: r3476
This commit is contained in:
Tim Waugh 2004-08-22 16:30:43 +00:00
parent 960890fd7d
commit 8afdb56aee
2 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2004-08-22 Tim Waugh <twaugh@redhat.com> 2004-08-22 Tim Waugh <twaugh@redhat.com>
* src/WriteGedcom.py (GedcomWriter.export_data): Write individuals
out in GRAMPS ID order.
* src/ReadXML.py (GrampsParser.start_object): Set GRAMPS ID. * src/ReadXML.py (GrampsParser.start_object): Set GRAMPS ID.
* src/WriteXML.py (write_xml_data): Fixed typo causing XML export to * src/WriteXML.py (write_xml_data): Fixed typo causing XML export to

View File

@ -682,11 +682,16 @@ class GedcomWriter:
self.writeln('2 CONT Not Provided') self.writeln('2 CONT Not Provided')
pkeys = self.plist.keys() pkeys = self.plist.keys()
pkeys.sort() sorted = []
for key in pkeys:
person = self.db.get_person_from_handle (key)
tuple = (person.get_gramps_id (), person)
sorted.append (tuple)
sorted.sort()
nump = float(len(self.plist)) nump = float(len(self.plist))
index = 0.0 index = 0.0
for key in pkeys: for (gramps_id, person) in sorted:
self.write_person(self.db.get_person_from_handle(key)) self.write_person(person)
index = index + 1 index = index + 1
#if index%100 == 0 and not self.cl: #if index%100 == 0 and not self.cl:
# self.pbar.set_fraction(index/nump) # self.pbar.set_fraction(index/nump)