Login to participate
  
Register   Lost ID/password?
Louis Kessler’s Behold Blog » Blog Entry           prev Prev   Next next

Reading Partial or Incomplete Files - Mon, 12 Nov 2007

Sometimes I’m amazed how one thing can lead to something unexpected.

All I wanted to do was allow Behold to attempt to process “illegal” GEDCOM files. I wanted it to process a GEDCOM if there wasn’t a header, had missing sources, or maybe was corrupted in some places.

So I went to the extreme and took a GEDCOM I had and deleted the beginning and the end. It now only had a bunch of individuals and data about those individuals in it, without their families or anything else.

My first run like that gave me a bunch of individuals and nothing more. But individuals in GEDCOMs do have links to their “family” (husband/wife pair) via a FAMS link, and also to their parent’s family via a FAMC link. So that got me thinking.

What I had been doing up to now is only including the link one way into Behold’s GEDCOM-based data structure. I was expecting that Behold would get the other link from the GEDCOM itself, since GEDCOM requires it. After reading the GEDCOM, Behold goes through an extensive GEDCOM check and reports wherever the links are missing one way.

But then I realized I could add the link both ways when reading them the first time, and simply verify it when it occurs again. Doing this, Behold can get all the information it needs from just one of the links.

Once I added that, my partial file now appeared just about perfect in the Everything Report. When I first saw it, I really couldn’t believe it. All the families were figured out and I could hardly tell there was anything wrong with the input file.

As a result, in a few hours, I’ve changed some core code of Behold for the better.

So now Behold will have yet another possible use. If for some reason, you get part of a GEDCOM file (maybe it got truncated via e-mail), Behold will be able to do a darn good job organizing and reconstructing just about everything that’s in it.

No Comments Yet

Leave a Comment

You must login to comment.

Login to participate
  
Register   Lost ID/password?