Normalizing my contact data
Now that my address book is in my self-hosted Caldav+Carddav solution, I wanted to update how I displayed the contacts in my address book. InfCloud has some defaults, and I wanted to change them.
I store my contacts with Google Voice numbers labeled as such, and displaying these in InfCloud's main display is possible if you normalize the data. I had used various custom names for that phone field, such as "google voice" and "GrandCentral."
Inside my collection directory, I ran this command.
sed -i -r -e '/ABLABEL:/{s/google ?voice|grand ?central/googlevoice/gi;}' *.vcf
And then I set this variable in my config.js
.
var globalCollectionDisplay = [
{ label: '{Name}', value: ['{LastName}, ','{FirstName}'] },
{ label: '{Email}', value: ['{Email[:0]}'] },
{ label: '{Email} 2', value: ['{Email[:1]}'] },
{ label: '{Phone} 1', value: ['{Phone[:0]}'] },
{ label: 'GV', value: ['{Phone[type=googlevoice]}'] }
];
Comments