* src/ReadGedcom.py: fix relative path filenames and build

the thumbnail image


svn: r3747
This commit is contained in:
Don Allingham 2004-11-24 03:55:25 +00:00
parent c01cd56028
commit 291ce80774
3 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-11-23 Don Allingham <dallingham@users.sourceforge.net>
* src/ReadGedcom.py: fix relative path filenames and build
the thumbnail image
2004-11-22 Don Allingham <dallingham@users.sourceforge.net>
* src/EditSource.py: add in-place editing for key,value pairs
* src/ReadXML.py: add support for Source key,value pairs

View File

@ -59,6 +59,9 @@
2 SOUR @S1600@
1 SEX M
1 TITL Grand Poobah
1 OBJE
2 FROM jpeg
2 FILE foo/O0.jpg
1 BIRT
2 DATE 24 MAY 1961
2 PLAC San Jose, Santa Clara Co., CA

View File

@ -360,6 +360,10 @@ class GedcomParser:
if os.path.isfile(fullname):
return (1,fullname)
other = os.path.join(altpath,fullname)
tries.append(other)
if os.path.isfile(other):
return (1,other)
other = os.path.join(altpath,os.path.basename(fullname))
tries.append(other)
if os.path.isfile(other):
@ -1071,7 +1075,7 @@ class GedcomParser:
def parse_person_object(self,level):
form = ""
filename = ""
title = ""
title = "no title"
note = ""
while 1:
matches = self.get_next()
@ -1109,6 +1113,7 @@ class GedcomParser:
photo.set_description(title)
photo.set_mime_type(Utils.get_mime_type(path))
self.db.add_object(photo, self.trans)
self.db.set_thumbnail_image(photo.get_handle(),path)
oref = RelLib.MediaRef()
oref.set_reference_handle(photo.get_handle())
self.person.add_media_reference(oref)