• Category: admin
  • License: GNU General Public License (GPL) version 3
  • Updated: 2013-1-13
  • Downloads: 2687


Previous releases:




I have modified Csv2Contacts a little bit. Now you also can export contacts.

Full description:

  • 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]