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

Reply via email to