Quote:
Originally Posted by kaaspad
I personally am prowling around here for a solution on syncing my blackberry 8700c with kontact (kaddressbook) to be exact. I would use barry but unfortunately there is no easy to use LDIF to kmail importer....
|
Since we're already way off topic (heh), have you tried using the longer way of exporting a LDIF file with Barry, importing it to Thunderbird, then exporting it from ThunderBird as a CSV file, then importing it to KAB? Not being a KDE user I've not tried this, but it sounds generally painless enough.
I wrote a small PHP exporter for work, the basic field mappings (for barry) you can start with are below; note my code is converting from 'standard' organizationalPerson schema into the slighty altered attribute names that Mozilla likes.
I chopped out all the logic, so basically you see that mozilla map is on the left, LDIF on the right being pulled out of $people_info array.
Code:
$raw = "dn: cn=".$people_info[0]["cn"][0];
$raw .= "\nobjectclass: top\n";
$raw .= "objectclass: person\n";
$raw .= "objectclass: organizationalPerson\n";
$raw .= "objectclass: inetOrgPerson\n";
$raw .= "objectclass: mozillaAbPersonAlpha\n";
$raw .= "modifytimestamp: 0Z\n";
$raw .= "givenName: ".$people_info[0]["givenname"][0]."\n";
$raw .= "sn: ".$people_info[0]["sn"][0]."\n";
$raw .= "cn: ".$people_info[0]["cn"][0]."\n";
$raw .= "mail: ".$people_info[0]["mail"][0]."\n";
$raw .= "telephoneNumber: ".$people_info[0]["telephonenumber"][0]."\n";
$raw .= "homePhone: ".$people_info[0]["homephone"][0]."\n";
$raw .= "mobile: ".$people_info[0]["mobile"][0]."\n";
$raw .= "homeStreet: ".$people_info[0]["street"][0]."\n";
$raw .= "mozillaHomeLocalityName: ".$people_info[0]["l"][0]."\n";
$raw .= "mozillaHomeState: ".$people_info[0]["st"][0]."\n";
$raw .= "mozillaHomePostalCode: ".$people_info[0]["postalcode"][0]."\n";
$raw .= "title: ".$people_info[0]["title"][0]."\n";
$raw .= "company: ".$people_info[0]["o"][0]."\n";
$raw .= "mozillaHomeUrl: ".$people_info[0]["labeleduri"][0]."\n";
$raw .= "description: ".$people_info[0]["description"][0]."\n";
So if you used the 0.6+ LDIF mappings of barry, you could create an export format (one time template) that would import into TBird flawlessly, then use that to generate a CSV file.
Just an idea -- smells like you could shellscript all of it though.
Mmmm, I love the smell of bash-fu in the morning...