X-Git-Url: https://git.cworth.org/git?p=notmuch-wiki;a=blobdiff_plain;f=bindings.mdwn;h=9352aba1d973051c1c818e634533c6782b201f4d;hp=0b3964bafdd43f90c55f670944fb8a21a20d6734;hb=HEAD;hpb=1a57885ca77d52569fdf80605006777ab8d4e613 diff --git a/bindings.mdwn b/bindings.mdwn index 0b3964b..9288c0a 100644 --- a/bindings.mdwn +++ b/bindings.mdwn @@ -1,16 +1,17 @@ [[!img notmuch-logo.png alt="Notmuch logo" class="left"]] # Notmuch Language Bindings [DRAFT] -The Notmuch library, `libnotmuch`, can be used from many programming languages -using the Notmuch language bindings. The [[command line interface|manpages]] and -the [[email clients and frontends|frontends]] are based on the language -bindings. +The Notmuch library, `libnotmuch`, can be used from many programming +languages using the Notmuch language bindings. The [command line +interface](https://notmuchmail.org/doc/latest/man1/notmuch.html) and +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) +`libnotmuch` is a shared C library. [The API](https://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/notmuch.h) The Notmuch command-line interface is based on the C library. @@ -18,29 +19,28 @@ The Notmuch command-line interface is based on the C library. 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/). +documentation](https://notmuchmail.org/doc/latest/python-bindings.html). 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 + >>> from notmuch2 import Database + >>> db = Database() + >>> messages = list(db.messages('tag:inbox AND NOT tag:killed')) [...] -[The source](http://git.notmuchmail.org/git/notmuch/tree/HEAD:/bindings/python/) +[The source](https://git.notmuchmail.org/git/notmuch/tree/HEAD:/bindings/python-cffi/) ## Ruby -[The source](http://git.notmuchmail.org/git/notmuch/tree/HEAD:/bindings/ruby/) +[The source](https://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, +vim](https://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/) +[The source](https://git.notmuchmail.org/git/notmuch/tree/HEAD:/contrib/go/)