Yolinux.com Tutorial

OpenLDAP LDIF to Palm Pilot CSV format for address book file exchange

The Palm Pilot will interface with the program "Palm Desktop" to export/import a CSV (comma separated variables) file for data transfer betwwen address books. This page covers the exchange between the LDAP OpenLDAP LDIF file to the PALM acceptable CSV format for the exchange of address book data.

Related YoLinux Tutorials:

°LDAP server configuration

°LDAP client authentication

°LDAP bind authentication

°Extending LDAP an schema

°LDAP schema for MS/Outlook

°AWebDap: LDAP web interface

°YoLinux Tutorials Index




Free Information Technology Magazines and Document Downloads
TradePub link image


Mapping between OpenLDAP LDIF and Palm Pilot CSV Fields:

The following is a mapping between the RFC 2798 LDAP inetOrgPerson object attributes and the Palm Desktop generated CSV file.

Field Number Field Name LDAP Attribute
1 Last Name sn
2 First Name givenName
3 Title title
4 Company o
5 Work telephoneNumber
6 Home homePhone
7 Fax facsimileTelephoneNumber
8 Other mobile or pager
9 E-mail mail
10 Street postalAddress
11 City l
12 State st
13 Zip postalCode
14 Country c

Note: While "c" is not in the inetOrgPerson schema
it is often part of other schemas.
15 Custom1
16 Custom2
17 Custom3
18 Custom4
19 Note Card Description (??)
20 Private (Yes/No)
21 Category Name ou or o

Note:

  • If Private is selected on the Palm Pilot then field 20 will be "1" else it will be a "0".
  • Palm Pilot Street and "Note Card" fields will allow a Cntl-M.
  • All fields are enclosed in quotes. This is particular to the Palm generated CSV export file and not to the CSV format itself.


Palm Generated CSV Examples:

  • "Shumway1","Gordon","President","Alf Ltd","408-555-1254","408-555-1255","408-555-1256","408-555-1257","Gordon!@usa.com","123 Anywhere Street","San Jose","CA","95128","USA","","","","","","0","Family"
  • "Shumway2","Gordon","VP","Alf Ltd","405-555-1234","408-555-1235","408-555-1236","408-555-1237","Gordon2@usa.com","12345 Lost Street","San Jose","CA","95129","USA","","","","","","1","Family"
  • "Shumway3","Gordon","President","Alf Ltd","408-555-1231","408-555-1232","408-555-1233","408-555-1234","gordon3@usa.com","1234 My Streeet","San Jose","CA","95128","USA","","","","","This is the Note Card","0","Family"
  • "Shumway4","Gordon","President","Alf Company","408-555-1235","408-555-1235","408-555-1235","408-555-1235","gordon4@usa.com","123 Any Street Apt #45","San Jose","CA","95128","USA","","","","","","0","Family"
  • "Test 1","One","President","The Test 1 Company","408-555-1212","(408) 555-1587","408-555-1234","","test1@yahoo.com","123 Anywhere St","San Jose","CA ","95128","USA","","","","","","0","Family"
  • "Test2","Two","Vice President","Test2 Company","213-555-1212","","","","test2_two@hotmail.com","158 Anywhere St","Los Angeles","CA","95138","USA","","","","","","0","Family"
  • "test3","Three","","","","","","","test3@excite.com","","","","","","","","","","This is the attached note card.
  • You can add stuff here that may not be in the regular Palm Desktop program.","0","Family"
  • "Last Name","First Name","Title","Company","Work Number","Home Number","Fax Number","Other","Email","Street","City","State","Zip","Country","Custom 1","Custon 2","Custom 3","Custom 4","0","Catagory Name"
  • "Last name1","First name","Title","Company","Work","Home","Fax","Other","E-Mail","Street","City","State","Zip","Country","Custom 1","Custom 2","Custom 3","Custom 4","","0","Family"


Conversion routine:

Output to Palm Pilot Desktop readable CSV file:

/usr/sbin/ldbmcat -n /var/lib/ldap/fraternity/id2entry.gdbm | /opt/bin/LDIFtoPalmCSV | sort
/opt/bin/LDIFtoPalmCSV - Compiled for Red Hat 7.1

Notes:

  • This software requires that LDAP entries inherit or be of the object type inetOrgPerson. Entries which do not meet this qualification are NOT exported.
  • If a parent object contains the "country" attribute "c", this software will support the export of the country field.
  • The Palm field 20 is hard coded to "0" or non-private.
  • Anyone is free to use this software executable free of fee or royalty. No support is implied or given and is provided without warantee.


Links:

   

    Bookmark and Share


Advertisements





 

Copyright © 2001 by Greg Ippolito