From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Converting org-mode/org-contacts to VCard (importing to Android) Date: Fri, 22 Nov 2013 18:09:42 +0100 Message-ID: <2013-11-22T17-57-08@devnull.Karl-Voit.at> References: <2013-11-22T17-28-29@devnull.Karl-Voit.at> <3414130.xOGDSAomuL@descartes> Reply-To: news1142@Karl-Voit.at Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjuF5-00052j-IW for emacs-orgmode@gnu.org; Fri, 22 Nov 2013 12:10:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjuEy-00082B-Dm for emacs-orgmode@gnu.org; Fri, 22 Nov 2013 12:10:07 -0500 Received: from plane.gmane.org ([80.91.229.3]:44412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjuEy-000825-6o for emacs-orgmode@gnu.org; Fri, 22 Nov 2013 12:10:00 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VjuEv-0002im-PQ for emacs-orgmode@gnu.org; Fri, 22 Nov 2013 18:09:57 +0100 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Nov 2013 18:09:57 +0100 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Nov 2013 18:09:57 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * RĂ¼diger Sonderfeld wrote: > On Friday 22 November 2013 17:37:01 Karl Voit wrote: >> The reason I wrote it in Python is that I don't know ELISP well >> enough. The reason I wrote the script instead of using existing >> export methods: I only want to export a small sub-set (names, phone >> numbers, email addresses, contact image) due to privacy reasons. > > That should be possible with the existing VCard export. See `org-contacts- > ignore-property' to ignore specific properties. And `org-contacts-export-as- > vcard' takes a NAME parameter to limit the names. Fair enough :-) However, I did additional things like checks, filtering, and so forth that were important to my data-set. E.g., my contact template does contain "0043/" as a pre-filled content for phone numbers. I wanted to ignore those fields that got only this template and not a complete phone number. I also wanted to get warnings in case some data does not fulfill certain other requirements. I have to admit that I don't know the feature-set of the Org-mode export. I would be very surprised, if the Org-mode export method is able to follow my custom "photo:" link I am using, grab the image file, test if it has a image format that works with VCard 2.1 on Android, and encodes it in base64 accordingly. You see: I want to have ways to tweak the export process. And as long as I don't know ELISP that well, I stick to the tools I know. A side remark of mine: a couple of months ago I tried to find out how to store address information, phone numbers, and so on in org-contact properties. AFAIR I could not find anything except the :EMAIL: property. Is there a standard out there that answers questions like "separate street from house number?", "how to cope with multiple addresses for one contact?", and so forth? I created something on my own as you can see on [1]. I am happy if you can get benefit from my little project and I am also happy when Org-mode offers a great export functionality for the rest of us :-) 1. https://raw.github.com/novoid/org-contacts2vcard/master/testdata/testcontacts.org -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github