* import: now relies on item_f*t() only when it's safe
Internal field assignation used to be very wrong what made the
LDIF import unreliable. This is not the case anymore
* import: ability to consider additional aliases of LDIF attributes,
eg: "zip" for "postalcode", "fax" for "facsimiletelephonenumber", ...
* import: multiple emails support (up to 2, naturally)
* import/export: added support for "description" (NOTES),
"anniversary" and "ou" (GROUPS)
* export: replaced the attribute named "xmozillaanyphone" by
the _more standard_ "telephonenumber"
Code has been heavily commented and hopefully opens the way
to a better and more extensible LDIF importer.
The last chunk of that patch is a bit unclear but very simple:
LDIF export got rid of some uneeded indirections: there's no point
in testing LDIF_ITEM_FIELDS and doing ldif_conv_table[] translations.
Iterating over j until ITEM_FIELDS to grab names from
ldif_field_names[j] is enough.
Other than new features, effective changes to LDIF export
brought by this commit are:
* attribute order is changed (eg: the URL attribute will
displayed after MOBILEPHONE)
* no more empty ",mail:" in the "dn:" when no email exists
* export now uses the "telephonenumber" attribute
instead of "xmozillaanyphone" previously
The LDIF import may be (undetectably) slower.
That being said, the results a the below command are now
far more reliable.
$ diff ~/.abook/addressbook
<( ./abook --convert --infile ~/.abook/addressbook --outformat ldif | \
./abook --convert --informat ldif --outformat abook )