I am implementing the addition of _UID's to PhpGedView for future integration with the new FamilySearch APIs.
The Perl algorithm that was shown on this list only adds _UID's to INDI and FAM record types. Shouldn't _UID's also be added to SOUR, REPO, OBJE, and other level 0 GEDCOM records types? --John John Finlay PhpGedView Project Manager http://www.phpgedview.net -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Johnson Sent: Friday, May 26, 2006 12:02 PM To: LDS Open Source Software Subject: Re: [Ldsoss] Developer Services for the New FamilySearch website On Fri, May 26, 2006 at 07:45:36AM -0700, Thomas Haws wrote: > On 5/25/06, Gordon Clarke <[EMAIL PROTECTED]> wrote: > > > > LDS Software Developers > > > >http://www.familysearchdevnet.org/downloads/gedcom/FS-TT1001.doc > > Pardon me if I'm out of line, but I couldn't help wondering why you offered > "C" code with such a scary sounding copyright declaration on the Free > Software dedicated LDSOSS list. If that licence was a bit too restrictive for you, here's something I just knocked up that will add UUIDs to your GEDCOM file and it comes with a nice friendly licence. It's also fat free, biodegradable and won't harm the ozone layer. ("The same terms as Perl" means your choice of Artistic licence or GPL.) #!/usr/bin/perl # Copyright 2006, Paul Johnson ([EMAIL PROTECTED]) # This software is free. It is licensed under the same terms as Perl itself. use strict; use warnings; use Data::UUID; use Gedcom; $SIG{__WARN__} = sub { warn @_ unless "@_" =~ /_UID/ }; my $file = shift or die "usage: $0 file.ged"; my $ged = Gedcom->new(gedcom_file => $file) or die "Can't open $file\n"; my $ug = Data::UUID->new; sub uuid { (my $h = $ug->create_hex) =~ s/^0x//; $h } $_->get_item("_UID") or $_->add("_UID", uuid) for $ged->individuals, $ged->families; $ged->write("$file.uuid"); -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net _______________________________________________ Ldsoss mailing list [email protected] http://lists.ldsoss.org/mailman/listinfo/ldsoss _______________________________________________ Ldsoss mailing list [email protected] http://lists.ldsoss.org/mailman/listinfo/ldsoss
