<h2 id="howimanagecontacts">How I Manage Contacts</h2>

<p>About a year ago I decided to try to clean up my contacts. </p>

<p>The problem: CRUFT! </p>

<ul>
<li>Importing, exporting re-importing in different accounts and in different email clients and several computers etc over span of ~10 years.</li>
<li>1200+ gmail contacts</li>
<li>Many duplicates</li> 
</ul>

<p>What I wanted:</p>

<ul>
<li>1 set of contacts across platforms with single source file from which all
others are generated</li>
<li>plain-text format, easy to use w/scripting &amp; text editor</li>
<li>No duplicates</li>   
<li>no cruft</li>
<li>easy to maintain</li>
<li>easy to import/export in T-bird, ownCloud</li>
<li>sync with phone</li> 
</ul>

<p>Steps to Success:</p> 

<ol>
<li>Turn off Gmail default setting that saves every incoming email address in your address book</li>
<li>Deleted all extraneous contacts (went from ~1200 down to about 400)</li>
<li>Tedious part here: compare duplicates, consolidate info</li>
<li>Decide on source-file format</li>
<li>T-bird = LDIF</li>   
<li>OwnCloud = vCard</li>
<li>LDIF wins b/c found script to convert to vCard, but not good script for other direction</li>
<li>Convert all disparate contacts lists to LDIF, begin consolidating into one file</li>
<li>LDIF ready? Import to T-bird</li>
<li>Perl script to convert LDIF to vCard &#8211;&gt; import to ownCloud</li>
<li>CardDAV-sync to sync from o.c. to phone</li>
<li>Bash script to create new LDIF entries, convert to vcf, add to master file easily</li>
</ol>

<p>Wishlist </p>

<ol>
<li>Make t-bird sync w/owncloud (t-bird SOGO extension broken)</li>
<li>CLI API to update owncloud contacts via a script instead of having to use the web interface</li>
</ol>

<p>Links </p>

<ul>
<li>CardDAV-sync android app <a href="https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync&amp;hl=en">https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync&amp;hl=en</a></li>
<li>OwnCloud <a href="https://owncloud.org/">https://owncloud.org/</a></li>
<li>Thunderbird Addon: Duplicate Contact Manager <a href="https://addons.mozilla.org/en-us/thunderbird/addon/duplicate-contact-manager/">https://addons.mozilla.org/en-us/thunderbird/addon/duplicate-contact-manager/</a></li>
<li>Original ldif2vcf perl script <a href="https://www.barninger.com/ldif_to_vcard/">https://www.barninger.com/ldif_to_vcard/</a></li>
<li>My modified version: <a href="https://paste.jonkulp.net/view/d47bbeca">https://paste.jonkulp.net/view/d47bbeca</a></li>
<li>My ldif creator bash script <a href="https://paste.jonkulp.net/view/32922107">https://paste.jonkulp.net/view/32922107</a></li>
</ul>