2004-08-23 Tim Waugh <twaugh@redhat.com>
* src/WriteGedcom.py (GedcomWriter.write_sources): Write sources in ID order for easier change tracking. svn: r3483
This commit is contained in:
parent
aaf6a71702
commit
237ff088c7
@ -1,4 +1,7 @@
|
|||||||
2004-08-23 Tim Waugh <twaugh@redhat.com>
|
2004-08-23 Tim Waugh <twaugh@redhat.com>
|
||||||
|
* src/WriteGedcom.py (GedcomWriter.write_sources): Write sources
|
||||||
|
in ID order for easier change tracking.
|
||||||
|
|
||||||
* src/WriteXML.py (XmlWriter.write_xml_data): Use GRAMPS ID not DB
|
* src/WriteXML.py (XmlWriter.write_xml_data): Use GRAMPS ID not DB
|
||||||
handle.
|
handle.
|
||||||
(XmlWriter.dump_source_ref): Likewise.
|
(XmlWriter.dump_source_ref): Likewise.
|
||||||
|
@ -825,9 +825,14 @@ class GedcomWriter:
|
|||||||
def write_sources(self):
|
def write_sources(self):
|
||||||
nump = float(len(self.slist))
|
nump = float(len(self.slist))
|
||||||
index = 0.0
|
index = 0.0
|
||||||
|
sorted = []
|
||||||
for key in self.slist.keys():
|
for key in self.slist.keys():
|
||||||
source = self.db.get_source_from_handle(key)
|
source = self.db.get_source_from_handle(key)
|
||||||
self.writeln("0 @%s@ SOUR" % self.sid(source.get_gramps_id()))
|
tuple = (self.sid (source.get_gramps_id ()), source)
|
||||||
|
sorted.append (tuple)
|
||||||
|
sorted.sort ()
|
||||||
|
for (source_id, source) in sorted:
|
||||||
|
self.writeln("0 @%s@ SOUR" % source_id)
|
||||||
if source.get_title():
|
if source.get_title():
|
||||||
self.writeln("1 TITL %s" % fmtline(self.cnvtxt(source.get_title()),248,1,self.nl))
|
self.writeln("1 TITL %s" % fmtline(self.cnvtxt(source.get_title()),248,1,self.nl))
|
||||||
if source.get_author():
|
if source.get_author():
|
||||||
|
Loading…
Reference in New Issue
Block a user