GooBook -- Access your Google contacts from the command line.
.. contents:: **Table of Contents**
The purpose of GooBook is to make it possible to use your Google Contacts from
the command-line and from MUAs such as Mutt.
It can be used from Mutt the same way as abook.
There is a number of ways to install Python software.
- Using pip
- Using a source tarball
- Using source directly from gitorius
- From a distribution specific repository
pip or easy_install
This is the recommended way to install goobook for most users that
don't have it available in their distribution.
When installing this way you will not need to download anything manually.
Install like this::
$ pip install goobook
Download the source tarball, uncompress it, then run the install command::
$ tar -xzvf goobook-*.tar.gz
$ cd goobook-*
$ sudo python ./setup.py install
For most users it will be enough to to run::
$ goobook authenticate
and follow the instructions.
To get access too more settings you can create a configuration file::
goobook config-template > ~/.goobookrc
It will look like this::
# "#" or ";" at the start of a line makes it a comment.
# The following are optional, defaults are shown
# This file is written by the oauth library, and should be kept secure,
# it's like a password to your google contacts.
# The client secret file is not really secret.
# New contacts will be added to this group in addition to "My Contacts"
# Note that the group has to already exist on google or an error will occur.
# One use for this is to add new contacts to an "Unsorted" group, which can
# be sorted easier than all of "My Contacts".
NOTE:: The keyring support is not available at the moment but might reappear.
Similarly, goobook supports authentication by keyring_. The keyring package
supports multiple backends, depending on your
environment. You should configure it to point to the one you're using by
default. To use this option, set your e-mail address in the config file but
leave the password field commented out (or blank). You need to have a password
for the "gmail" service and your e-mail address stored in the keyring. There
are several ways to achieve this, here is one::
>>> import keyring
>>> keyring.set_password("gmail", "email@example.com", "secret")
.. _keyring: http://pypi.python.org/pypi/keyring
If you use a proxy you need to set the https_proxy environment variable.
If you want to use goobook from mutt.
Set in your .muttrc file::
set query_command="goobook query '%s'"
to query address book. (Normally bound to "Q" key.)
If you want to be able to use <tab> to complete email addresses instead of Ctrl-t add this:
bind editor <Tab> complete-query
To add email addresses (with "a" key normally bound to create-alias command)::
macro index,pager a "<pipe-message>goobook add<return>" "add the sender address to Google contacts"
If you want to add an email's sender to Contacts, press a while it's selected in the index or pager.
To query your contacts::
$ goobook query QUERY
The add command reads a email from STDIN and adds the From address to your Google contacts::
$ goobook add
The cache is updated automatically according to the configuration but you can also force an update::
$ goobook reload
For more commands see::
$ goobook -h
$ goobook COMMAND -h
Links, Feedback and getting involved
- PyPI home: http://pypi.python.org/pypi/goobook
- Code Repository: http://gitlab.com/goobook/goobook
- Issue tracker: http://gitlab.com/goobook/goobook
- Mailing list: http://groups.google.com/group/goobook
* #55 Fixed argument conflict between goobook and oauth2client
* Fixed so that the included client_secrets.json is installed with the source.
* Google no longer support ClientLogin (simple username/password)
* Removed support for ClientLogin
* Added OAuth2 support
* Removed support for .netrc
* Removed email, password, passwordeval fields from config
* Removed support for keyring, this might be temporary
* Removed support for executable .goobookrc
* Issue 41 Changed keyring dependency into an extra.
* Issue 43 depend on setuptools>=0.7 instead of distribute (they have merged)
* add support for default group by Samir Benmendil
* Issue 42 Include a manual page
* Removed dependency on hcs_utils, included the used module instead. On request, to simplify for packagers.
* Issue 39 Support for hcs-utils>=1.3
* Issue 40 Removed bundled distribute_setup.py
* Dropping support for Python 2.6, only Python 2.7 is now supported
If you can't upgrade to 2.7 stay with 1.4.
* No longer necessary to configure goobook to be able to generate a configuration template...
* Fixed issue 28: No Protocol is set on GTalk IM
* Fixed issue 32: Encoding problem of unicode chars on non unicode terminal.
* Fixed issue 34: Unable to query due to keyring/DBus regression
* Fixed issue 35: passwordeval
* Fixed issue 36: When the contact has no title mutt will use the extra_str as the title.
1.4a5 never released
* Correctly decode encoded From headers, by Jonathan Ballet
* Fixed IM without protocol, Issue 26
* Fixed encoding issues on OS X, Issue 33
* passwordeval, get password from a command by Zhihao Yuan
* Fixed bug in parsing postal addresses.
* Adjusted output format for postal addresses.
* Added contacts are now added to "My Contacts", this fixes problem with
searching now finding contacts you have added with goobook.
* Searches also matches on phonenumber (Patch by Marcus Nitzschke).
* Detailed, human readable, search results (Patch by Marcus Nitzschke).
* When a query match a email-address, only show that address and not
all the contacts addresses.
* Added option to filter contacts that are in no groups (default on).
* Fixed mailing to groups
* Improved some error messages
* Isssue 20: Encoding on some Mac OS X
* Issue 21: Cache file never expires
* Support for auth via keyring
No changes since 1.3rc1
* Support for executable .goobookrc (replaces direct GnuPG support)
* Faster, more compact cache
* dump commands no longer use the cache
* Caching most contact data but not all
* Python 2.5 compability
* Added flags --verbose and --debug
* Added possibility to add a contact from the command-line.
* Added possibility to prompt for password.
* New command: dump_contacts
* New command: dump_groups
* New dependency, hcs_utils
* Now caching all contact data.
* Support for using a GnuPG encrypted config file (later replaced).
* Fixed bug when checking for the config file.
* Major refactoring
* Issue 14: Only search in these fields: name, nick, emails, group name.
In 1.1 the group URL was also searched, which gave false positives.
* Auto create cache if it doesn't exist.
* Use current locale to decode queries.
* Encode printed text using current locale.
* Added option to specify different configfile.
* Some documentation/help updates.
* The .goobookrc is now really optional.
* Added config-template command.
* Issue 13: Added support for contact groups.
* New cache format, no longer abook compatible (JSON).
* Issue 2: BadAuthentication error can create a problematic cache file so
subsequent runs fail
* Issue 6: cache management needs improvements
- reload, force refresh command
- configurable cache expiry time
* Issue 7: Should probably set safe permissions on settings.pyc
* Issue 8: 'add' doesn't strip extraneous quotation marks
* Issue 9: Indentation error when run without arguments
* Issue 10: Query doesn't browse nicknames
* New abook compatible cache format.
* sort results
* Using SSL
* New config format
* .netrc support
* Supports adding non-ASCII From: headers.
TODO: Brief introduction on what you do with files - including link to relevant help section.