* src/plugins/WriteGedcom.py: use the correct id value

svn: r3270
This commit is contained in:
Don Allingham 2004-07-13 04:21:05 +00:00
parent d016cc5775
commit 748ff3b83c
3 changed files with 19 additions and 12 deletions

View File

@ -1,3 +1,6 @@
2004-07-12 Don Allingham <dallingham@users.sourceforge.net>
* src/plugins/WriteGedcom.py: use the correct id value
2004-07-12 Alex Roitman <shura@alex.neuro.umn.edu> 2004-07-12 Alex Roitman <shura@alex.neuro.umn.edu>
* src/Exporter.py: Keep track of added extra pages. * src/Exporter.py: Keep track of added extra pages.
* src/plugins/WriteGedcom.py: Switch from radiobuttons to menu * src/plugins/WriteGedcom.py: Switch from radiobuttons to menu

View File

@ -1,7 +1,6 @@
* Allow for multiple notes. A tabbed interface would be really useful, * Allow for multiple notes. A tabbed interface would be really useful,
since there are no titles for notes. Not all objects would necessarily since there are no titles for notes. Not all objects would necessarily
need multiple notes. Determine which ones should and shouldn't. need multiple notes. Determine which ones should and shouldn't.
* Startup tips.
* Date calculator. * Date calculator.
See http://sourceforge.net/mailarchive/forum.php?thread_id=3252078&forum_id=1993 See http://sourceforge.net/mailarchive/forum.php?thread_id=3252078&forum_id=1993
* Add string substitutions for web page generation (name, report name, * Add string substitutions for web page generation (name, report name,
@ -17,4 +16,12 @@
(both individual and family). (both individual and family).
* Add autofill feature for City, Church parish, County, State and Country? * Add autofill feature for City, Church parish, County, State and Country?
* Move LDS temple info out of const.py and into an XML file * Move LDS temple info out of const.py and into an XML file
* Enhanced web page generator
* GEDCOM 6.0 import/export
* View all sources related to a particular object
* Make the descendant graph adapt to the page size, not stuck with the current
3 entries per page.
* Add slideshow generation ability to web page generator
* Enhance privacy handling
* Better name handling, especially of non-European style names
* And a whole lot more.... * And a whole lot more....

View File

@ -521,8 +521,6 @@ class GedcomWriter:
self.flist = {} self.flist = {}
self.fidval = 0 self.fidval = 0
self.fidmap = {} self.fidmap = {}
self.pidval = 0
self.pidmap = {}
self.sidval = 0 self.sidval = 0
self.sidmap = {} self.sidmap = {}
@ -743,14 +741,16 @@ class GedcomWriter:
self.frefn(family_id) self.frefn(family_id)
person_id = family.get_father_id() person_id = family.get_father_id()
if person_id != None and self.plist.has_key(person_id): if person_id != None and self.plist.has_key(person_id):
self.writeln("1 HUSB @%s@" % self.pid(person_id))
person = self.db.try_to_find_person_from_id(person_id) person = self.db.try_to_find_person_from_id(person_id)
gramps_id = person.get_gramps_id()
self.writeln("1 HUSB @%s@" % gramps_id)
father_alive = person.probably_alive(self.db) father_alive = person.probably_alive(self.db)
person = family.get_mother_id() person_id = family.get_mother_id()
if person != None and self.plist.has_key(person_id): if person_id != None and self.plist.has_key(person_id):
self.writeln("1 WIFE @%s@" % self.pid(person_id))
person = self.db.try_to_find_person_from_id(person_id) person = self.db.try_to_find_person_from_id(person_id)
gramps_id = person.get_gramps_id()
self.writeln("1 WIFE @%s@" % gramps_id)
mother_alive = person.probably_alive(self.db) mother_alive = person.probably_alive(self.db)
if not self.restrict or ( not father_alive and not mother_alive ): if not self.restrict or ( not father_alive and not mother_alive ):
@ -779,8 +779,8 @@ class GedcomWriter:
for person_id in family.get_child_id_list(): for person_id in family.get_child_id_list():
if not self.plist.has_key(person_id): if not self.plist.has_key(person_id):
continue continue
self.writeln("1 CHIL @%s@" % self.pid(person_id))
person = self.db.try_to_find_person_from_id(person_id) person = self.db.try_to_find_person_from_id(person_id)
self.writeln("1 CHIL @%s@" % person.get_gramps_id())
if self.adopt == GedcomInfo.ADOPT_FTW: if self.adopt == GedcomInfo.ADOPT_FTW:
if person.get_main_parents_family_id() == family.get_id(): if person.get_main_parents_family_id() == family.get_id():
self.writeln('2 _FREL Natural') self.writeln('2 _FREL Natural')
@ -830,7 +830,7 @@ class GedcomWriter:
# self.sbar.set_fraction(1.0) # self.sbar.set_fraction(1.0)
def write_person(self,person): def write_person(self,person):
self.writeln("0 @%s@ INDI" % self.pid(person.get_gramps_id())) self.writeln("0 @%s@ INDI" % person.get_gramps_id())
restricted = self.restrict and person.probably_alive (self.db) restricted = self.restrict and person.probably_alive (self.db)
self.prefn(person) self.prefn(person)
primaryname = person.get_primary_name () primaryname = person.get_primary_name ()
@ -1251,9 +1251,6 @@ class GedcomWriter:
if match: if match:
self.writeln('1 REFN %d' % int(match.groups()[0])) self.writeln('1 REFN %d' % int(match.groups()[0]))
def pid(self,id):
return id
def sid(self,id): def sid(self,id):
if self.sidmap.has_key(id): if self.sidmap.has_key(id):
return self.sidmap[id] return self.sidmap[id]