mu4e and google contacts (e.g. goobook)?

96 views
Skip to first unread message

Magnus Therning

unread,
Jan 13, 2016, 8:38:08 AM1/13/16
to mu-discuss

Does anyone have a working setup for getting google contacts into mu4e,
e.g. via using goobook[1]?

/M

[1]: https://gitlab.com/goobook/goobook

--
Magnus Therning OpenPGP: 0x927912051716CE39
email: mag...@therning.org jabber: mag...@therning.org
twitter: magthe http://therning.org/magnus

The definition of insanity is doing the same thing over and over again
and expecting different results.
-- Albert Einstein
signature.asc

zeltak brisbane

unread,
Apr 11, 2016, 1:22:29 AM4/11/16
to mu-discuss
im also interested in this if anyone uses google contacts with mu4e

thx

Z

Shivam Kalra

unread,
Apr 11, 2016, 9:52:25 AM4/11/16
to mu-di...@googlegroups.com

Hi,

zeltak brisbane <ikl...@gmail.com> writes:

> im also interested in this if anyone uses google contacts with mu4e
>
> thx
>
> Z
>
> On Wednesday, January 13, 2016 at 3:38:08 PM UTC+2, Magnus Therning wrote:
>>
>>
>> Does anyone have a working setup for getting google contacts into mu4e,
>> e.g. via using goobook[1]?
>>
>> /M
>>
>> [1]: https://gitlab.com/goobook/goobook
>>
>> --
>> Magnus Therning OpenPGP: 0x927912051716CE39
>> email: mag...@therning.org <javascript:> jabber: mag...@therning.org
>> <javascript:>
>> twitter: magthe http://therning.org/magnus
>>
>> The definition of insanity is doing the same thing over and over again
>> and expecting different results.
>> -- Albert Einstein
>>

I'm unable to hookup goobook with mu4e completion. However, I've small
helm based completion for insert email, name or name <email> in current
buffer using goobook.

Check out my gist at:
https://gist.github.com/shivamkalra/4475a415dabdc89a131a69feaa95a7b6


This requires to have executable script goosearch with following code:

#!/bin/sh
goobook query "$@" | awk -F'\t' '/.+/ {print $1 "\t" $2}' | uniq


--
Shivam

zeltak brisbane

unread,
Apr 11, 2016, 11:52:37 PM4/11/16
to mu-discuss
thx Shivam this is fantastic!

i still havent been able to get it to show results in helm.
I have goobook installed and working great querying from the command line (im using arch linux)
i created the script >  /home/zeltak/bin/goosearch, made it executable and pasted this in it:


#!/bin/sh
  goobook query "$@" | awk -F'\t' '/.+/ {print $1 "\t" $2}' | uniq

finally added the gist to my init emacs file.

i can launch helm-goobook in emacs but the buffer comes up empty with no contacts when i filter (again i can query from the CLI)

any clue what im missing here?

thx!

Z

zeltak brisbane

unread,
Apr 11, 2016, 11:55:10 PM4/11/16
to mu-discuss
Ok ignore the last mail :)

i switched from #!/bin/sh  to #!/bin/bash and it worked ;-)

this is epic ;-)

off topic slightly, can i query other data alongside email with goobook and helm (like phone numbers?)

thx!

Z

Shivam Kalra

unread,
Apr 12, 2016, 12:42:47 PM4/12/16
to mu-di...@googlegroups.com
Hi Zeltak,

zeltak brisbane <ikl...@gmail.com> writes:

> Ok ignore the last mail :)
>
> i switched from #!/bin/sh to #!/bin/bash and it worked ;-)
>
> this is epic ;-)

I'm glad it is useful for you.

> off topic slightly, can i query other data alongside email with goobook and
> helm (like phone numbers?)

This would require some change to the script. I believe you can use:

goobook dquery <search-term>

to get the phone numbers. May be you would need to convert the response
to JSON and use elisp's JSON library.

You can change `helm-goobook-search` function in the script to include
`phone` attribute as well. Once you have `phone` attribute, you can add
some action in `helm` to do something useful with phone number.

--
Regards,
Shivam
Reply all
Reply to author
Forward
0 new messages