1 .. cnotmuch documentation master file, created by
2 sphinx-quickstart on Tue Feb 2 10:00:47 2010.
4 .. currentmodule:: cnotmuch
6 Welcome to :mod:`cnotmuch`'s documentation
7 ===========================================
9 The :mod:`cnotmuch` module provides an interface to the `notmuch <http://notmuchmail.org>`_ functionality, directly interfacing to a shared notmuch library.
10 The classes :class:`notmuch.Database`, :class:`notmuch.Query` provide most of the core functionality, returning :class:`notmuch.Messages` and :class:`notmuch.Tags`.
12 .. moduleauthor:: Sebastian Spaeth <Sebastian@SSpaeth.de>
14 :License: This module is covered under the GNU GPL v3 (or later).
16 This page contains the main API overview. More information on specific topics can be found on the following pages: (none here yet)
18 Notmuch can be imported as::
20 from cnotmuch import notmuch
24 from cnotmuch.notmuch import Query,Database
30 :mod:`notmuch` -- The Notmuch interface
31 =============================================
33 .. automodule:: cnotmuch.notmuch
35 :todo: Document nmlib,STATUS
37 :class:`Database` -- The underlying notmuch database
38 -----------------------------------------------------
40 .. autoclass:: Database([path=None[, create=False[, mode=MODE.READ_ONLY]]])
42 .. automethod:: create
44 .. automethod:: open(path, status=MODE.READ_ONLY)
46 .. automethod:: get_path
48 .. automethod:: get_version
50 .. automethod:: needs_upgrade
52 .. automethod:: upgrade
54 .. automethod:: get_directory
56 .. automethod:: add_message
58 .. automethod:: remove_message
60 .. automethod:: find_message
62 .. automethod:: get_all_tags
64 .. automethod:: create_query
66 .. attribute:: Database.MODE
68 Defines constants that are used as the mode in which to open a database.
71 Open the database in read-only mode
74 Open the database in read-write mode
76 .. autoattribute:: db_p
78 :class:`Query` -- A search query
79 -----------------------------------------------
83 .. automethod:: create
85 .. attribute:: Query.SORT
87 Defines constants that are used as the mode in which to open a database.
90 Sort by message date, oldest first.
93 Sort by message date, newest first.
96 Sort by email message ID
98 .. automethod:: set_sort
100 .. automethod:: search_threads
102 .. automethod:: search_messages
104 .. automethod:: count_messages
106 :class:`Messages` -- A bunch of messages
107 ----------------------------------------
109 .. autoclass:: Messages
111 .. automethod:: collect_tags
113 .. automethod:: __len__
115 :class:`Message` -- A single message
116 ----------------------------------------
118 .. autoclass:: Message
120 .. automethod:: get_message_id
122 .. automethod:: get_thread_id
124 .. automethod:: get_replies
126 .. automethod:: get_filename
128 .. automethod:: get_flag
130 .. automethod:: set_flag
132 .. automethod:: get_date
134 .. automethod:: get_header
136 .. automethod:: get_tags
138 .. automethod:: remove_tag
140 .. automethod:: add_tag
142 .. automethod:: remove_all_tags
144 .. automethod:: freeze
148 .. automethod:: format_as_text
150 .. automethod:: __str__
152 :class:`Tags` -- Notmuch tags
153 -----------------------------
158 .. automethod:: __len__
160 .. automethod:: __str__
162 :class:`Threads` -- Threads iterator
163 ------------------------------------
167 :class:`Thread` -- A single thread
168 ------------------------------------
172 :class:`Filenames` -- An iterator over filenames
173 ------------------------------------------------
177 :class:`Directoy` -- A directory entry in the database
178 ------------------------------------------------------
182 :exc:`NotmuchError` -- A Notmuch execution error
183 ------------------------------------------------
184 .. autoexception:: NotmuchError
187 This execption inherits directly from :exc:`Exception` and is raised on errors during the notmuch execution.
189 :class:`STATUS` -- Notmuch operation return status
190 --------------------------------------------------
191 .. autoclass:: STATUS