Discussion:
[Bitpim-devel] VCard status?
Tom Pollard
2004-03-25 04:38:30 UTC
Permalink
Hi,

What's the current status of the code supporting vcard import and
export of phonebook entries? I see the vcard.py file, but it doesn't
appear to be used anywhere. (I probably just didn't look hard
enough...)

Thanks,

TomP
Roger Binns
2004-03-25 06:06:54 UTC
Permalink
Post by Tom Pollard
What's the current status of the code supporting vcard import and
export of phonebook entries? I see the vcard.py file, but it doesn't
appear to be used anywhere. (I probably just didn't look hard
enough...)
You did look hard enough :-)

The VFile class needs a little more to be completed, as is noted
in the comments.

The VCard class then needs to translate elements into a table
(think like a CSV file). None of this code has been written
yet.

You may also be under the impression that Vcard is somehow
a sane and sensible format. It isn't. A human will have
a hard enough time understanding one correctly, let alone
a machine. There is a lot of ambiguity in the format, and
in different versions of the format, and I didn't actually
find any program that 100% conforms to the spec anyway.

I did gather up examples of every format I saw out there.
You can find it in examples/vcards.vcf This will make a nice
project for someone :-)

Roger
Tom Pollard
2004-03-25 06:19:10 UTC
Permalink
Post by Roger Binns
Post by Tom Pollard
What's the current status of the code supporting vcard import and
export of phonebook entries? I see the vcard.py file, but it doesn't
appear to be used anywhere. (I probably just didn't look hard
enough...)
You did look hard enough :-)
I was afraid of that.
Post by Roger Binns
The VFile class needs a little more to be completed, as is noted
in the comments.
The VCard class then needs to translate elements into a table
(think like a CSV file). None of this code has been written
yet.
Ok.
Post by Roger Binns
You may also be under the impression that Vcard is somehow
a sane and sensible format. It isn't.
Bummer.
Post by Roger Binns
A human will have
a hard enough time understanding one correctly, let alone
a machine. There is a lot of ambiguity in the format, and
in different versions of the format, and I didn't actually
find any program that 100% conforms to the spec anyway.
Sane - or not - it's the only export format for the MacOS X Address
Book. I hope I'll be forgiven if ambiguities in the spec are resolved
arbitrarily in favor of Address Book usage.
Post by Roger Binns
I did gather up examples of every format I saw out there.
You can find it in examples/vcards.vcf This will make a nice
project for someone :-)
:-), indeed.


Thanks,

Tom
Roger Binns
2004-03-25 06:57:20 UTC
Permalink
Post by Tom Pollard
I hope I'll be forgiven if ambiguities in the spec are resolved
arbitrarily in favor of Address Book usage.
Whoever actually writes the code gets first pick as to how it
is done. Anyone else concerned can supply patches :-)

Roger
Steven Palm
2004-03-25 14:05:51 UTC
Permalink
Post by Tom Pollard
Sane - or not - it's the only export format for the MacOS X Address
Book. I hope I'll be forgiven if ambiguities in the spec are resolved
arbitrarily in favor of Address Book usage.
Export format, perhaps, but not the only way to get that data out. You
can extract bits through the AddressBook API provided by Apple, so
perhaps a small C library wrapped by SWIG would allow Python to
interact with AddressBook in a much more useful fashion. I started
looking at this, but didn't get very far as my spare time is
non-existant these days. iCal has no API yet, so you are stuck with
using AppleEvents or just dealing with the raw data files.
Tom Pollard
2004-03-25 14:27:03 UTC
Permalink
Post by Steven Palm
Post by Tom Pollard
Sane - or not - it's the only export format for the MacOS X Address
Book. I hope I'll be forgiven if ambiguities in the spec are
resolved arbitrarily in favor of Address Book usage.
Export format, perhaps, but not the only way to get that data out.
You can extract bits through the AddressBook API provided by Apple, so
perhaps a small C library wrapped by SWIG would allow Python to
interact with AddressBook in a much more useful fashion.
That's a good idea. I'll probably still go for vCard export/import
first.
Post by Steven Palm
I started looking at this, but didn't get very far as my spare time is
non-existant these days. iCal has no API yet, so you are stuck with
using AppleEvents or just dealing with the raw data files.
Ok. FWIW, it looks like iCal supports vCalendar, iCalendar, and
Entourage formats for import, and exports vCalendar files.


Thanks,

Tom
Roger Binns
2004-03-25 18:16:50 UTC
Permalink
Post by Tom Pollard
Ok. FWIW, it looks like iCal supports vCalendar, iCalendar, and
Entourage formats for import, and exports vCalendar files.
vCalendar is also in the VFile format. I have never looked into
the spec or implementations to see how bad it is. Hopefully it
is way better than vCard simply because there are fewer
implementations :-)

Roger

Loading...