pjcj/Gedcom.pm

Trailing asterisks removed from NOTE->CONT

erinishimoticha opened this issue · 3 comments

I used the little script from the documentation which prints each individual's birthday, and I amended it to write out a copy of the unchanged GEDCOM data, but there were some functional differences in the two GEDCOM files.

#!/usr/bin/perl -w

use strict;
use Gedcom;

my $ged = Gedcom->new(
    grammar_version => "5.5",
    gedcom_file => shift
);

for my $i ($ged->individuals) {
    for my $bd ($i->get_value("birth date")) {
        print $i->name, " was born on $bd\n";
    }
}

$ged->write("new.ged");

diff -wBu old.ged new.ged shows that many of my CONT children of the NOTE tag have had trailing asterisks removed. I was using them to mark individuals who required further study.

-  2 CONT * 9th GGF [http://www.geni.com/people/Thomas-Jefferson-I/6000000003615503118 Thomas Jefferson] *
+2     CONT * 9th GGF [http://www.geni.com/people/Thomas-Jefferson-I/6000000003615503118 Thomas Jefferson]

Is this an invalid GEDCOM construct that your module has corrected, or is it something that should be expected to be retained during the writing of a file? My old GEDCOM was exported from Geni.com and run through my own sanitizer script that converts some non-standard tags to a standard format recognized by Rootsweb.

I also get this one other change that I don't understand. No other SUBM tags in my file are modified. I can provide the file if it would help diagnose.

- 1 SUBM @S6000000003377202711@
+1   SUBM S6000000003377202711
pjcj commented

Thanks very much for this report. I'm terribly sorry it has taken me so long to even reply.

You are correct that the star at the end of the line being deleted was a bug, caused by using the same regex to parse both the grammar and the GEDCOM file. I have fixed the problem in 0cc1b77 and it will be in the next release.

With respect to the SUBM change, I'm afraid that I cannot reproduce this. Is it still a problem for you? If so, and you are still able to provide the GEDCOM file to reproduce it, I would be very grateful.

I'll leave this ticket open until we get to the bottom of that one.

Thanks again!

I've tried a couple of different Geni.com GEDCOMs, and I can't reproduce the problem.

pjcj commented

OK. Thanks very much for checking. I'll close this ticket now, but please feel free to open a new one should the problem reappear.