diff --git a/ChangeLog b/ChangeLog index 5978b100c..de354fef4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-11-23 Don Allingham + * src/ReadGedcom.py: fix relative path filenames and build + the thumbnail image + 2004-11-22 Don Allingham * src/EditSource.py: add in-place editing for key,value pairs * src/ReadXML.py: add support for Source key,value pairs diff --git a/example/gedcom/sample.ged b/example/gedcom/sample.ged index 62db2ae71..25bb5f6b0 100755 --- a/example/gedcom/sample.ged +++ b/example/gedcom/sample.ged @@ -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 diff --git a/src/ReadGedcom.py b/src/ReadGedcom.py index c12162dab..8dd46cb9a 100644 --- a/src/ReadGedcom.py +++ b/src/ReadGedcom.py @@ -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)