>>>>> "Alex" == Alex White <[EMAIL PROTECTED]> writes:
Alex> Hey, I recently wrote a perl script to export a bbdb database to LDIF Alex> format, or to directly add entries to an ldap server. Thanks very much! Attached is a patch with some minor fixes the biggest of which is replacing 'gn' with 'givenName'. With that I start seeing the person's first name in the address book (I'm running 10.3.7). Malcolm
*** bbdb2ldap.pl.orig Thu Feb 24 21:28:54 2005 --- bbdb2ldap.pl Thu Feb 24 23:02:49 2005 *************** *** 10,16 **** # # bbdb config ! my $bbdb_file = "/Users/wu/.bbdb"; # ldap config my $dc = "dc=geekfarm, dc=org"; --- 10,16 ---- # # bbdb config ! my $bbdb_file = $ENV{"HOME"} . "/.bbdb"; # ldap config my $dc = "dc=geekfarm, dc=org"; *************** *** 113,119 **** my $first = $record->part( 'first' ); my $last = $record->part( 'last' ); ! next unless ( $first || $last ); my $dn = "cn=$first $last, ou=addressbook, $dc"; $dn = lc( $dn ); --- 113,119 ---- my $first = $record->part( 'first' ); my $last = $record->part( 'last' ); ! return undef unless ( $first || $last ); my $dn = "cn=$first $last, ou=addressbook, $dc"; $dn = lc( $dn ); *************** *** 125,131 **** print OUT print_field( "objectClass", "organizationalPerson" ); print OUT print_field( "objectClass", "inetOrgPerson" ); print OUT print_field( "cn", "$first $last" ); ! print OUT print_field( "gn", "$first" ); print OUT print_field( "sn", $last || $first ); # Email --- 125,131 ---- print OUT print_field( "objectClass", "organizationalPerson" ); print OUT print_field( "objectClass", "inetOrgPerson" ); print OUT print_field( "cn", "$first $last" ); ! print OUT print_field( "givenName", "$first" ); print OUT print_field( "sn", $last || $first ); # Email
-- Malcolm Purvis <[EMAIL PROTECTED]> In Melbourne there is plenty of vigour and eagerness, but there is nothing worth being eager or vigorous about. -- Francis Adams, 'The Australians', 1893