From 1a57885ca77d52569fdf80605006777ab8d4e613 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Mon, 19 Oct 2015 23:15:44 +0300 Subject: [PATCH] bindings: all-around update --- bindings.mdwn | 31 ++++++++++++++++++++++++++++++- howto.mdwn | 16 +--------------- index.mdwn | 1 + 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/bindings.mdwn b/bindings.mdwn index e52030c..0b3964b 100644 --- a/bindings.mdwn +++ b/bindings.mdwn @@ -3,15 +3,44 @@ The Notmuch library, `libnotmuch`, can be used from many programming languages using the Notmuch language bindings. The [[command line interface|manpages]] and -many of the [[email clients and frontends|frontends]] are based on the language +the [[email clients and frontends|frontends]] are based on the language bindings. [[!toc levels=2]] ## C and C++ +`libnotmuch` is a shared C library. [The API](http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/notmuch.h) + +The Notmuch command-line interface is based on the C library. + ## Python +Notmuch includes Python bindings to the Notmuch shared library. Please refer to +the nice and extensive [Notmuch Python API +documentation](http://notmuch.readthedocs.org/projects/notmuch-python/). + +The bindings are very simple to use. As an example, given you have the Python +bindings installed (or simply set your PYTHONPATH environment variable to point +to the .../bindings/python directory), this snippet will produce a list of mails +matching the given expression: + + >>> import notmuch + >>> db = notmuch.Database() + >>> query = db.create_query('tag:inbox AND NOT tag:killed') + >>> list(query.search_messages()) # doctest:+ELLIPSIS + [...] + +[The source](http://git.notmuchmail.org/git/notmuch/tree/HEAD:/bindings/python/) + ## Ruby +[The source](http://git.notmuchmail.org/git/notmuch/tree/HEAD:/bindings/ruby/) + +The [client for +vim](http://git.notmuchmail.org/git/notmuch/blob/HEAD:/vim/README) is in Ruby, +so worth a look. + ## Go + +[The source](http://git.notmuchmail.org/git/notmuch/tree/HEAD:/bindings/go/) diff --git a/howto.mdwn b/howto.mdwn index 1b143a9..77df009 100644 --- a/howto.mdwn +++ b/howto.mdwn @@ -66,21 +66,7 @@ refer to the mailing list. ## **Use notmuch from python** -Notmuch includes python bindings to the notmuch shared library. Please -refer to the nice and extensive -[notmuch python API documentation](http://notmuch.readthedocs.org/). - -The bindings are very simple to use. As an example, given you have -the python bindings installed (or simply set your PYTHONPATH -environment variable to point to the .../bindings/python directory), -this snippet will produce a list of mails matching the given -expression: - - >>> import notmuch - >>> db = notmuch.Database() - >>> query = db.create_query('tag:inbox AND NOT tag:killed') - >>> list(query.search_messages()) # doctest:+ELLIPSIS - [...] +See the [[Notmuch Library Language Bindings|bindings]] page. ## **Using notmuch with Mutt** diff --git a/index.mdwn b/index.mdwn index 46e9e39..cc684bf 100644 --- a/index.mdwn +++ b/index.mdwn @@ -68,6 +68,7 @@ After that, come back and checkout our documentation: * [[Remote usage|remoteusage]] * [[Performance|performance]] * [[References|references]] + * [[Notmuch Library Language Bindings|bindings]] Apart from the wiki, help is available via email and on IRC (see below). Join the mailing list. Read the archives. Ask questions. -- 2.43.0