Renamed to process-contacts.php and switched from CRLF to LF.
I have modified Csv2Contacts a little bit. Now you also can export contacts.

The export feature uses the same mapping that is used for
imports. Thus you can easily modify and reimport files resulting
from exports.
The mapping proposed in the script fits for addressbook exports
from the Thunderbird mail client but it can be changed.

Some minor changes for imports:

 * Converted line endings from CRLF to LF, so the shebang is
   detected correctly and you can omit "php" when running the
   script (at least for Ubuntu 12.04 when running from bash).
 * First name ("given_name") and last name ("surname") swapped
   for compiled "fileas" name (for proper sorting).
 * Private address prioritized (as I use Zarafa for private
   issues), but this can be changed.
 * You can specifiy catagories via a parameter as well
   (semi-colon-separated list, enclosing in quotes might be necessary to
   protect it from shell).
 * Enhanced error handling.
 * Keep or replace contacts already existing.

Usage Import:

process-contacts.php import username password filename add|replace [categories]

Usage Export:

process-contacts.php export username password filename [overwrite]

Originally from
https://community.zarafa.com/pg/plugins/project/15948/developer/mastersyncer/csv2contacts-with-export-feature
Merge pull request #4 from mcepl/process_contacts

Process contacts