Vcard2person and person2vcard scripts

I archive my contacts in vcard format, but really wanna use the the Haiku person format for contacts, too.

So I threw together a couple scripts for converting in-between them. Kinda hackish, but maybe it’ll be useful for someone else too, jaja.

2 Likes

There was already a converter available here: http://www.goodeveca.net/beos/

1 Like

Heck, looks like a fork of that would’ve been a better use of time.

It doesn’t seem to support photos or multi versions yet, but shouldn’t be hard to add.

Cool that was also on my list :relieved:
Does it keep the original vcard data as content of the person file?
I’d really love to stay true to the BeOS spirit here, with the information as file mantra, like the RFC mail message was stored as mail file content, too, for example

1 Like

In Haiku the file contents is normally used for the jpeg picture of the contact.

1 Like

I see… strictly speaking I’d rather store this as an attribute, e.g. Base64 encoded, as it doesn’t hold all information about the file, just like an attachment in a mail message.

I see this has already been pondered, but not finished, there was a Google code-in project on GUI matters, and vcard vs. custom attributes was discussed.

I think with an independent vCard translator, this could be solved elegantly, as the core functionality of converting between vCard and a stanard e.g. BContact format could be separated from Tracker and the People application.

Trac issue is https://dev.haiku-os.org/ticket/9374
(focus was on UI but has the best info collected)

As for saving the vcard to a person file, that’s a good idea. So I just pushed a commit to do that.

‘-A’ option saves the vcard to the ‘META:vcard’ attr, and e’-a’ writes the vcard to the person file (so you can’t use a photo with it).

1 Like

Just gave it the first star :smirk:
But now we have a very recent and complete vcard converter which is bash only, and a BeOS app that is outdated :relieved:
Ideal combination imo would be a current and complete C++ Haiku translator that provides a standard model like BContact (also mentioned in the Trac ticket referenced before) that is used by the people app… and/or possibly the previously elsewhere discussed index server that transparently converts or extracts this information in the background… Oh my I digress :relieved:

Why would you base64? Attributes can be binary data, not just strings. Don’t make things more complex than needed :slight_smile:

Haha you’re right, I’m traumatized by working with REST APIs all the time😅

Hi, I’m a couple of years late :slightly_smiling_face:, but I was just referred to this thread by someone using your scripts. I’m the author of the old BeOS apps to do much the same thing. Unfortunately I’m otherwise not particularly qualified for the job!

At the time I had a Psion 5MX that used the vcard format for its contacts and I just did a quick survey of the protocol at the time and the ‘Person’ format to create the apps. The package on my site http://www.goodeveca.net/beos/vcardpeople.zip (unlike the package on HaikuDepot) has all the sources, and is freely available.

OTOH your scripts are much more up-to-date and comprehensive… There’s just one problem – I can’t get them to work! I can’t figure out why.

Edit: AAAARRRGGGHHH!!! I just took a closer look at my copied scripts, and in both cases I was missing the very last line!! How that could happen I have no idea, but of course it’s the vital one. Still isn’t quite working, but it’s active now!

3 Likes