directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: CSV to LDIF
Date Mon, 03 May 2010 20:48:53 GMT
On 5/3/10 10:15 PM, Roland Berger wrote:
> Hello
> I was looking for a way to import my outlook addresses into an open 
> ldap server to be able to use evolution as an outlook replacement. 
> There is no easy and automatic way to do it so I started to think to 
> write a csv to ldif converter.
> The basic idea is to have on one side the csv headers on the other 
> side attributes of some objectclasses defined in a schema and do the 
> mapping in an gui. Before starting to write my own ldif parser I'm 
> sure you guys have already done it. I have searched the apache ds 
> websites but found only little code which might be reusable to suite 
> my idea. May be its because apache ds is a huge project. Can anyone 
> point me to the right place to start reading and tell me if apache ds 
> would be interested for a contribution like this?
We don't have such a CVS to LDIF converter yet. We do have a Ldif to CVS 

We would love to have something that does the conversion though !

The best would be to have it in Ldap Studio.

FYI, 6 years ago, I wrote such a tool, and AFAIR, the real issue is the 
mapping. LDAP Attributes may be multi-valued, and each attribute must 
have a name. Assuming that the first row contains the LDAP attribute's 
name, that would be quite easy to transform a CVS file to LDIF.

We do have some convenient classes and methods to manipulate LDIF files, 
and in your case, you might be interested in those classes :

The LdifEntry class is the one contaning an LDAP entry, so when you have 
created an Entry (that's another class you can find in,

you can produce a LDIF file using the class. 

Hope it helps !

Emmanuel L├ęcharny

View raw message