So I finally setup gnus after reading some thousand of pages of manuals, now the only thing which is missing is an address book... I tried out org-contacts and it looks great, also because from my understanding BBDB has never been included in the Emacs default distribution and it's quite old.. So is there also a way to get all the contacts from my OSX address book? I can export to vCard and then it should not be hard to convert all the mails, but maybe someone already scripted that? The thing I'm wondering more is, is org-contacts only thought for mail addresses? Because I would really like to have a complete address book support from the command-line/Emacs to get rid of the stupid osx AddressBook.app, but it doesn't look that the purpose is this, right? Thanks for the great job :) Andrea
Hi Andrea, > So is there also a way to get all the contacts from my OSX address > book? > I can export to vCard and then it should not be hard to convert all the > mails, but maybe someone already scripted that? Sorry, can't help you with that, but I'm sure vCard is a good start as it is plain text. > The thing I'm wondering more is, is org-contacts only thought for mail > addresses? No it's not. As you can see here [1], Julien Danjou has already started to inlucde more features. For now org-contacts supportes mail addresses and irc nicknames. And I'm sure a lot more will follow. > Thanks for the great job :) +1 [1] http://git.naquadah.org/?p=org-contacts.git -- Michael
Michael Käufl <org-mode@lists.michael-kaeufl.de> writes: > No it's not. As you can see here [1], Julien Danjou has already started > to inlucde more features. For now org-contacts supportes mail addresses > and irc nicknames. And I'm sure a lot more will follow. > Good to know :) So I think I will avoid trying BBDB after all, I can start with this already. I have a first thing working well enough for the translation, I use contacts to get the fields: http://gnufoo.org/contacts/contacts.html It's very stupid now since it only takes one email and no other fields, but it's ready for enhancements. Anyway it --8<---------------cut here---------------start------------->8--- #!/usr/bin/env python """ Get the contacts with http://gnufoo.org/contacts/contacts.html and print out a org-contacts valid output """ import subprocess FMT = [("first name", "fn"), ("last name", "ln"), ("home mail", "he"), ("work mail", "we"), ("other mail", "oe"), ("birthday", "b")] cmd = "contacts -H -S -f '%s'" % (';'.join('%' + x[1] for x in FMT)) proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) out, err = proc.communicate() org_contact_template = """* %s :PROPERTIES: :EMAIL: %s :END: """ for line in out.splitlines(): s = line.split(';') if s[2]: print org_contact_template % (' '.join((s[0], s[1])), s[2]) --8<---------------cut here---------------end--------------->8---
[-- Attachment #1: Type: text/plain, Size: 662 bytes --] On Sat, Mar 05 2011, Andrea Crotti wrote: > Because I would really like to have a complete address book support from > the command-line/Emacs to get rid of the stupid osx AddressBook.app, but > it doesn't look that the purpose is this, right? You can set any properties anyway. Org-contacts just use some of them. For example I use LOCATION as a property to store my contacts' home addresses, which I usually set using C-c M-L provided by org-google-maps[1]. Just say out loud what you'd like to do, I'll try to answer or write code. :) [1] http://julien.danjou.info/google-maps-el.html -- Julien Danjou ❱ http://julien.danjou.info [-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
About the script used to import from AddressBook.app, I update it here https://github.com/AndreaCrotti/scripts/blob/master/contacts_to_org.py Now it creates as many contacts for the name as many as the email addresses. One thing I haven't found in fact is how to support multiple emails, is that too hard to do? Anyway in general I think I will use the VCF exported data instead, also because "contacts" is not very smart itself and a bit annoying to fetch all the single fields. A simple import mechanism (from csv for example) might be good to have directly inside org-contacts.el, what do you think?
[-- Attachment #1: Type: text/plain, Size: 283 bytes --] On Mon, Mar 07 2011, Andrea Crotti wrote: > One thing I haven't found in fact is how to support multiple emails, is > that too hard to do? If you mean in org-contacts, just use space as a separator for each mail address. -- Julien Danjou ❱ http://julien.danjou.info [-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
> > One thing I haven't found in fact is how to support multiple emails, is > > that too hard to do? > > If you mean in org-contacts, just use space as a separator for each mail > address. Thanks for this hint! Where are you planing to put the documentation? I know about http://julien.danjou.info/org-contacts.html , but are there any plans about a documentation where others can contribute? So that you could spend more time improving org-contacts ;) -- Michael
Julien Danjou <julien@danjou.info> writes:
> You can set any properties anyway. Org-contacts just use some of them.
>
> For example I use LOCATION as a property to store my contacts' home
> addresses, which I usually set using C-c M-L provided by
> org-google-maps[1].
>
> Just say out loud what you'd like to do, I'll try to answer or write
> code. :)
>
> [1] http://julien.danjou.info/google-maps-el.html
That's also very nice thanks.
Well the only thing that I would really love to have is a real working
synchronization mechanism, and a real address book with all the
interesting fields for everyone.
The fields I can also set them myself but maybe would be nice to define
some standard fields which can be set and are automatically recognized.
The once that is done, it would be easier to write some code to
synchronize org-contacts to AddressBook/gmail contacts/vcf and even more
important my android phone.
With org-mobile it might even make sense to update the address book
every time I push something ;)
[-- Attachment #1: Type: text/plain, Size: 1230 bytes --] On Tue, Mar 08 2011, Andrea Crotti wrote: > That's also very nice thanks. > Well the only thing that I would really love to have is a real working > synchronization mechanism, and a real address book with all the > interesting fields for everyone. Well, do not count on me for that. I use git, it does the job. :) > The fields I can also set them myself but maybe would be nice to define > some standard fields which can be set and are automatically recognized. Well, I had some but they are defcustom anyway, so there's no standard. I do not want to put too much obligation on the format used, because Org-mode is about organizing stuff the way you want. For example, some people might want to cut the address part in (STREET,ZIPCODE,CITY,COUNTRY) whereas I think it's a burden, I just put a LOCATION property with all the address in it. In the end, it does not matter for org-contacts. > The once that is done, it would be easier to write some code to > synchronize org-contacts to AddressBook/gmail contacts/vcf and even more > important my android phone. Sure that'd be cool. But I don't have such a phone unfortunately, so can't help. :) -- Julien Danjou ❱ http://julien.danjou.info [-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
Julien Danjou <julien@danjou.info> writes: > > Well, do not count on me for that. I use git, it does the job. :) Sure I also do ;) For synchronization I meant between different programs/protocol not different machines... When everything will work it won't be too necessary, but at least to switch to some importers are necessary imho. > > Well, I had some but they are defcustom anyway, so there's no standard. > I do not want to put too much obligation on the format used, because > Org-mode is about organizing stuff the way you want. > > For example, some people might want to cut the address part in > (STREET,ZIPCODE,CITY,COUNTRY) whereas I think it's a burden, I just put > a LOCATION property with all the address in it. In the end, it does not > matter for org-contacts. I agree on that sure, but it would not harm to define some templates of fields to make it immediately usable as a full "normal" address book. > Sure that'd be cool. But I don't have such a phone unfortunately, so > can't help. :) I'll try something out as soon as possible, I'm sick of my actual situation...
> For example, some people might want to cut the address part in
> (STREET,ZIPCODE,CITY,COUNTRY) whereas I think it's a burden, I just put
> a LOCATION property with all the address in it. In the end, it does not
> matter for org-contacts.
I use the splitted address version. And therefore I have one problem
which is however more general. I would like to group some properties.
So that I can have a properties group WORK and another group HOME.
* Friends
** Dave Null
:PROPERTIES:
:MOBILE: +49-1234-456789
:GROUP-WORK:
:EMAIL: dave@work.com
:LOCATION: …
:LANDLINE: +49-1234-567890
:GROUP-END:
:GROUP-HOME:
:EMAIL: dave@home.com
:LOCATION: …
:LANDLINE: +49-1234-987650
:GROUP-END:
:END:
I think this is not possible with the current design of the org
properties. Things like adding to persons /Dave Null (work)/ and
/Dave Null (home)/ or using WORK-EMAIL, HOME-EMAIL, … are not what I
would prefer.
My (at the moment best) idea to support grouping is:
* Friends
** Dave Null
:PROPERTIES:
:CONTACT: t
:MOBILE: +49-1234-456789
:END:
*** work
:PROPERTIES:
:EMAIL: dave@work.com
:LOCATION: …
:LANDLINE: +49-1234-567890
:END:
*** home
:PROPERTIES:
:EMAIL: dave@home.com
:LOCATION: …
:LANDLINE: +49-1234-987650
:END:
This would use all properties which are set directly as property of the
person as default and all others according to the requested group.
The absence of such groups is imho currently the main difference between
org-contacts and vcard/…
--
Michael
> Just say out loud what you'd like to do, I'll try to answer or write > code. :) Maybe you shouldn't have offered this. :) I've got one question and two feature requests: Q1) links to contacts Is there a common way to create links to contacts? F1) csv export When writing bulk letters with LaTeX, all I need is a file with the recipients addresses in some predefined order. So it would be nice to have some export option where I can choose the properties and contacts I'd like to export and get a csv file. F2) pgp keys I just started using gnus so I'm not quite familiar with it. According to [1] BBDB can be used to map recipients to pgp keys. So it would be great if org-contacts can support this in any way. I have no plans to use this at the moment, so no need to hurry. [1] http://www.emacswiki.org/emacs/GnusPGG#toc8 -- Michael
[-- Attachment #1: Type: text/plain, Size: 1060 bytes --] On Tue, Mar 08 2011, Michael Käufl wrote: > Q1) links to contacts > Is there a common way to create links to contacts? I'd say just the same way as for any Org entry. > F1) csv export > When writing bulk letters with LaTeX, all I need is a file with the > recipients addresses in some predefined order. So it would be nice to > have some export option where I can choose the properties and contacts > I'd like to export and get a csv file. I think it's more an Org problem than an org-contacts one. :) > F2) pgp keys > I just started using gnus so I'm not quite familiar with it. According > to [1] BBDB can be used to map recipients to pgp keys. So it would be > great if org-contacts can support this in any way. I have no plans to > use this at the moment, so no need to hurry. I'm not sure that's something you really need: Gnus GPG support just pick the key one address is for. You do not need to do a manual mapping. Unless you really want to, but that'd be weird. -- Julien Danjou ❱ http://julien.danjou.info [-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
Hi Michael,
Julien Danjou <julien@danjou.info> writes:
>> F1) csv export
>> When writing bulk letters with LaTeX, all I need is a file with the
>> recipients addresses in some predefined order. So it would be nice to
>> have some export option where I can choose the properties and contacts
>> I'd like to export and get a csv file.
>
> I think it's more an Org problem than an org-contacts one. :)
Have a look at EXPERIMENTAL/org-export.el and the use of this library in
EXPERIMENTAL/org-mediawiki.el: org-export.el has a filtering mechanism
that allows the user to select what subtree will be exported. This can
be useful in your case.
HTH,
--
Bastien