summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-03-10 21:53:44 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2012-03-18 17:21:56 +0000
commit7f13a129c3c9d8f21e1951b9d1cd99f5466e40d3 (patch)
treebe0d4386bb6f6ea3765fe75d97776cb17c3fab42
parent5c95a7f1db080e5130d6d97bc92f37f02e4e489e (diff)
db: count_threads
this introduces a new method `count_threads` for DBManager that uses a recently introduced getter of the same name in the bindings. We also adjust the dependencies for the bindings accordingly issue #178
-rw-r--r--alot/db/__init__.py4
-rw-r--r--docs/source/installation.rst2
-rwxr-xr-xsetup.py2
3 files changed, 6 insertions, 2 deletions
diff --git a/alot/db/__init__.py b/alot/db/__init__.py
index ca1f9b0b..c6a83064 100644
--- a/alot/db/__init__.py
+++ b/alot/db/__init__.py
@@ -202,6 +202,10 @@ class DBManager(object):
"""returns number of messages that match `querystring`"""
return self.query(querystring).count_messages()
+ def count_threads(self, querystring):
+ """returns number of threads that match `querystring`"""
+ return self.query(querystring).count_threads()
+
def search_thread_ids(self, querystring):
"""
returns the ids of all threads that match the `querystring`
diff --git a/docs/source/installation.rst b/docs/source/installation.rst
index 2e5b0f77..7f616099 100644
--- a/docs/source/installation.rst
+++ b/docs/source/installation.rst
@@ -10,7 +10,7 @@ A full list of dependencies is below:
* `libmagic and python bindings <http://darwinsys.com/file/>`_, ≥ `5.04`:
* `configobj <http://www.voidspace.org.uk/python/configobj.html>`_, ≥ `4.6.0`:
* `twisted <http://twistedmatrix.com/trac/>`_, ≥ `10.2.0`:
-* `libnotmuch <http://notmuchmail.org/>`_ and it's python bindings, ≥ `0.11`.
+* `libnotmuch <http://notmuchmail.org/>`_ and it's python bindings, ≥ `0.12`.
* `urwid <http://excess.org/urwid/>`_ toolkit, ≥ `1.0`
On debian/ubuntu these are packaged as::
diff --git a/setup.py b/setup.py
index f7f85b02..81207a0d 100755
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ setup(name='alot',
]},
scripts=['bin/alot'],
requires=[
- 'notmuch (>=0.9)',
+ 'notmuch (>=0.12)',
'argparse (>=2.7)',
'urwid (>=1.0)',
'twisted (>=10.2.0)',