HowTo: Which attributes are used by Contacts app by default

#1

Based on my problems with 3 addressbooks, migrated, synchronized, merged, edited manually etc etc I want to start here something as a HowTo.

This is the former topic: [Bug][Help] All attributes with "TYPE=x" are hidden - List of valid contact attributes wanted

Versions:

  • NC 15.0.2
  • Contacts 3.0.2

What I did:

  • Created a new contract with all available attributes (German translations of App GUI)
  • Exported to VCF file
  • Seperated attributes and values
  • Added Syntax and Syntax Check to the table
  • Tried to identify the syntax checks

I’m not an expert in CardDAV. So this is just what I found. Please support if you find anything wrong or not clear documented.

Here the exported VCF file:

BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.1.6//EN
UID:c7d113b8-6977-4056-8922-4d76ae7fef8b
FN:display-name
ADR;TYPE=HOME:adresse-privat-postfach;adresse-privat-erweiterte...;adresse-
 privat-adresse-straße;adresse-privat-stadt;adresse-privat-bundesland;adress
 e-privat-postleitzahl;adresse-privat-land
ADR;TYPE=WORK:adresse-arbeit-postfach;adresse-arbeit-erweiterte...;adresse-
 arbeit-adresse-straße;adresse-arbeit-stadt;adresse-arbeit-bundesland;adress
 e-arbeit-postleitzahl;adresse-arbeit-land
ADR;TYPE=OTHER:adresse-andere-postfach;adresse-andere-erweiterte...;adresse
 -andere-adresse-straße;adresse-andere-stadt;adresse-andere-bundesland;adres
 se-andere-postleitzahl;adresse-andere-land
EMAIL;TYPE=HOME:e-mail-privat@gmx.de
TEL;TYPE="HOME,VOICE":tel-privat
TEL;TYPE="WORK,VOICE":tel-arbeit
TEL;TYPE=CELL:tel-mobil
TEL;TYPE="WORK,CELL":tel-mobil-arbeit
TEL;TYPE="HOME,CELL":tel-mobil-privat
TEL;TYPE=FAX:tel-fax
TEL;TYPE="WORK,FAX":tel-fax-arbeit
TEL;TYPE="WORK,FAX":tel-fax-arbeit
TEL;TYPE=PAGER:tel-pager
TEL;TYPE=VOICE:tel-anruf
TEL;TYPE=CAR:tel-auto
TEL;TYPE="WORK,PAGER":tel-pager-arbeit
ORG:display-firma
TITLE:display-titel
CATEGORIES:WS
N:detaillierter-name-nachname;detaillierter-name-vorname;detaillierter-name
 -zusätzliche;detaillierter-name-präfix;detaillierter-name-suffix
URL:https://internetseite1.de
URL:https://internetseite2.de
RELATIONSHIP:COLLEAGUE
CLOUD;TYPE=HOME:federated-cloud-id-privat
CLOUD;TYPE=WORK:federated-cloud-id-arbeit
CLOUD;TYPE=OTHER:federated-cloud-id-andere
EMAIL;TYPE=WORK:e-mail-arbeit@gmx.de
EMAIL;TYPE=OTHER:e-mail-andere@gmx.de
NOTE:Notizen\, Notizen\, Notizen\, Notizen\, Notizen\, Notizen\, Notizen\, 
 Notizen\, Notizen\, Notizen\, Notizen\, Notizen\, Notizen\, Notizen\, Notiz
 en\, Notizen\, Notizen\, Notizen\, Notizen
EMAIL;TYPE=HOME:e-mail-privat2@gmx.de
EMAIL;TYPE=HOME:e-mail-privat3@gmx.de
BDAY:20190121T190614
X-SOCIALPROFILE;TYPE=facebook:soziales-netzwerk-facbook
X-SOCIALPROFILE;TYPE=GITHUB:soziales-netzwerk-github
X-SOCIALPROFILE;TYPE=GOOGLEPLUS:soziales-netzwerk-google+
X-SOCIALPROFILE;TYPE=INSTAGRAM:soziales-netzwerk-instagram
X-SOCIALPROFILE;TYPE=LINKEDIN:soziales-netzwerk-pinterest
X-SOCIALPROFILE;TYPE=PINTEREST:soziales-netzwerk-pinterest
X-SOCIALPROFILE;TYPE=QZONE:soziales-netzwerk-qzone
X-SOCIALPROFILE;TYPE=TUMBLR:soziales-netzwerk-tumblr
X-SOCIALPROFILE;TYPE=TWITTER:soziales-netzwerk-twitter
X-SOCIALPROFILE;TYPE=WECHAT:soziales-netzwerk-wechat
X-SOCIALPROFILE;TYPE=YOUTUBE:soziales-netzwerk-youtube
X-SOCIALPROFILE;TYPE=MASTODON:soziales-netzwerk-mastodon
X-SOCIALPROFILE;TYPE=DIASPORA:soziales-netzwerk-diasprora
X-SOCIALPROFILE;TYPE=OTHER:soziales-netzwerk-other_social_media
NICKNAME:spitzname
END:VCARD

Entry with German GUI:

Entry with English GUI:

Current status of the Excel file containing all information:

I do not know how to upload an Excel file to this posting. Feel free to PN me for sending.

@skjnldsv, your input? :smiley:

RFC 2426 vCard:
Vcard 3.0 https://tools.ietf.org/html/rfc2426#section-3.3.1
Vcard 4.0 https://tools.ietf.org/html/rfc6350#section-6.4.1

[Bug][Help] All attributes with "TYPE=x" are hidden - List of valid contact attributes wanted
#2

Maybe @davdroid also has inputs regarding the use of DAVx5 together with Nextcloud Contacts app?

#3

Hey!
I’ll suggest you export your full addressbook into a vcf file and then do the following

  1. open it with a proper text editor (sublime text, atom, vscode…)
  2. search and replace DAVDROID1. with an empty string
  3. repeat for every DAVDROID prefix you encounter
    (I recommend that you search with the regex mode enabled and this string: DAVDROID[0-9]\., this is going to be much faster)
  4. search and replace x-mobil by "CELL,VOICE"
  5. search and replace x-privat by "HOME,VOICE"
  6. continue this process for every unknown property
  7. remove every line containing X-ABLABEL
    (again, you can also search for .*X-ABLABEL.+\n with the regex mode and replace by an empty string)

Which result in:

BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.1.2//EN
UID:5f94f417-f457-49ec-a53e-89f53bf9df6e
FN:Nina Buxdehude
N:;Nina Buxdehude;;;
TEL;TYPE="CELL,VOICE":017-444-55555
TEL;TYPE="HOME,VOICE":+4917123456789
NOTE:Ich bin eine Notiz 
URL;TYPE=X-OTHER;VALUE=URI:https://help.nextcloud.com
REV:20170823T182609Z
END:VCARD
1 Like
#4

Thats exactly what I wanted to do! And thanks for the RegEx tipps … this I have to learn first. :grinning:

I assume also URL should have been replaced!?!?

URL;TYPE=X-OTHER;VALUE=URI:https://help.nextcloud.com
URL:https://help.nextcloud.com
#5

You can yes, but it’s not mandatory. :slight_smile:

#6

If I can help… :slight_smile: Are there any specific questions?

Btw, I don’t recommend to apply regular expressions to vCards (except for quick-and-dirty hacking). Things can break, for instance folding; and there are differences between vCard 3 and vCard 4 syntax. I’d always use a vCard parsing/generating library to modify vCards.

1 Like
#7

OMG: What is that?

ADR;TYPE=x-privat;LABEL=Wangen / Neuravensburg:;;;Wangen / Neurav
 ensburg;;;

There is no: in this entry!?!? What is LABEL ?

#8

This search is not finding any of these lines with Notepad++, Reg-Search:

X-ABLABEL:Mobil
X-ABLABEL:Privat
#9

What to do with that?

GROUPEDLOGS1.URL;VALUE=URI:https://www.facebook.com/ti.ni.3114
GROUPEDLOGS1.X-ABLABEL:Other
#10

Verion 4.0 !?!?!?!?!

With

NOTE:FIN:  153615
BEGIN:VCARD
VERSION:4.0
PRODID:+//IDN bitfire.at//DAVdroid/1.6.5-play ez-vcard/0.10.2
UID:d42bc848-96d2-46ea-8704-3205e78cb7ae
FN:Fodor
N:Fodor;;;;
NOTE:FIN:  153615
REV:20170811T174935Z
END:VCARD
#11

What to do with that?

ADR;TYPE=home;LABEL=Bregenz :;;;Bregenz ;;;

#12

VCard 3.0: Can this be deleted?

CLASS:PUBLIC

#13

VCard 4.0: Can this be deleted?

PRODID:+//IDN bitfire.at//DAVdroid/1.9.10-beta-gplay ez-vcard/0.10.3

#14

VCard 3.0: What is that?

ITEMTEL491627199998.TEL:+49 162 7199998

#15

Can I delete these entries?

UID:0ed8f7e6-6cee-470f-a29a-a0b7f69bc83a
REV:2017-12-29T23:16:42Z
#16

Yes there is after Neuravensburg

Remove the first part before the dot: URL;VALUE=URI:https://www.facebook.com/ti.ni.3114
You can drop the X-ABLABEL

It’s a proper value here. Though quite incomplete address :slight_smile:

Same, you can cut before the dot: TEL:+49 162 7199998

No. Though if you don’t have a UID and import it, the contacts app will generate a new one for you.

You can keep it

1 Like
#17

Thx a lot @skjnldsv! :+1: I already cleaned up my 3 address books with ~ 1.300 entries :sweat_smile:
I’m pretty sure that this HowTo will help lot of others.

Next question: Some entries are VCard 4.0 and have entries like this:

VERSION:4.0
PRODID:+//IDN bitfire.at//DAVdroid/1.10.1.1-gplay ez-vcard/0.10.3

  1. Where do they come from?
  2. They are working with Contacts. But why do you use VCard 3.0 as default?
#18

They come from davdroid.
We support both. We use vcard4 by default. :slight_smile:

#19

But entries created with Contacts always start with

BEGIN:VCARD
VERSION:3.0

:thinking:

#20

The contacts app does create 4.0 vcards by default