abook icon indicating copy to clipboard operation
abook copied to clipboard

Feature request: While import vcard use correct field name

Open therealmaxmoon opened this issue 5 years ago • 4 comments

I've imported a vcard (v2.1) from my android device, which includes birthday entries as BDAY. After importing them in abook, they were saved as addresses2 in abooks address book.

Would be nice to have it saved as birthday

therealmaxmoon avatar Feb 11 '20 19:02 therealmaxmoon

I'm curious, how are you importing? I can't find any documentation about how to import a contact, only to convert contact files.

Edit: I had yet to add any contacts, and the ? help didn't show anything about import until adding a test contact.

hhartzer avatar Dec 21 '23 11:12 hhartzer

I'm seeing a similar thing. I'm syncing my radical carddav server with vdirsyncer. Then I convert the synced .vcf files to abook with cat *.vcf | abook --convert --informat vcard --outformat abook > addressbook

The vcf files have BDAY in these two formats:

BDAY;VALUE=date:1604-06-19
BDAY:1985-12-15

In the resulting abook addressbook, these dates end up mostly in the fax field here.

Here is an example:

cat test.vcf
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iOS 16.1.2//EN
UID:DBB5F582-CE5E-4C8C-B75D-BF5F3199ABA2
BDAY;VALUE=date:1904-09-06
FN:Max Mustermann
N:Mustermann;Max;;;
REV:2023-01-18T10:37:49Z
TEL;TYPE=CELL,VOICE,pref:+49 123 456789
END:VCARD


cat test.vcf | abook --convert --informat vcard --outformat abook
# abook addressbook file

[format]
program=abook
version=0.6.1


[0]
name=Max Mustermann
mobile=+49 123 456789
fax=1904-09-06

c0dev0id avatar Jan 20 '24 09:01 c0dev0id