Discussion:
[Bitpim-devel] "Address Book Exporter" for Mac OS X
Peter Dufault
2004-06-12 11:49:05 UTC
Permalink
For the record, and maybe to be put in the bitpim help somewhere:

The program that some of us have used to export our OS X address book
to a Tab Separated "tsv" file is "Address Book Exporter" by David
Martin and Gwenhiver.net.

http://gwenhiver.net/applications/addressbookexporter/index.php

This is nice simple freeware with donations accepted.

Peter

Peter Dufault
HD Associates, Inc.
Roger Binns
2004-06-12 14:30:48 UTC
Permalink
Actually some Mac person should provide code that grabs the
data :-)

Roger
Peter Dufault
2004-06-14 12:12:31 UTC
Permalink
Post by Roger Binns
Actually some Mac person should provide code that grabs the
data :-)
Address book exports "vcards", so that Mac person should work on a
vcard importer.

Peter

Peter Dufault
HD Associates, Inc.
Roger Binns
2004-06-14 18:05:16 UTC
Permalink
Post by Peter Dufault
Address book exports "vcards", so that Mac person should work on a
vcard importer.
We are doing VCard anyway, but the idea is to automate the process
of import and later on export (which then turn into synchronization).

Roger
John Labovitz
2004-06-14 14:50:40 UTC
Permalink
Post by Roger Binns
Actually some Mac person should provide code that grabs the
data :-)
What sort of code would you need?

I was just writing a simple tool that would extract data from the
Address Book. It's simple, just uses the standard frameworks (==
libraries). It's a standalone tool that just outputs to stdout.

However, it's in Objective-C. I know there are Python bindings out
there for Cocoa (and therefore Address Book). Would that be better? I
don't know Python, but perhaps someone else here has done Cocoa/Python
work.

--
John Labovitz Consulting, LLC
http://mac.johnlabovitz.com
***@johnlabovitz.com
+1 503.949.3492
Roger Binns
2004-06-14 18:12:25 UTC
Permalink
Post by John Labovitz
What sort of code would you need?
If the Mac addressbook has "folders" like Outlook and Evolution
then there needs to be a way to select the relevant folder.

Other than that, the data needs to be made available preferably
as a table with the first row being column headers (ideally with
the same names as the BitPim importer uses, but the glue code
can do that conversion if necessary).

The code can either exist as a Python module (eg wrapped using
Swig) or an external binary such as you are doing. It will
all live in native/appleaddressbook and would consist of a
Python file that gets the data either by using Python module
or by reading the output of a binary located in the same
directory.

Some pointers if you are using an external binary:

- Output the strings using UTF-8
- Include some sort of serial/entry id with each row. This
is so the data can eventually be written back to the
address book and we know which entry to update
- Pick some escaping mechanism. I don't mind something like
a null byte between fields, and a double null at the end of
the record. Alternatively you may want to use CSV.

Roger

Loading...