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
65 .. attribute:: Database.MODE
67 Defines constants that are used as the mode in which to open a database.
70 Open the database in read-only mode
73 Open the database in read-write mode
75 .. autoattribute:: db_p
77 :class:`Query` -- A search query
78 -----------------------------------------------
82 .. automethod:: create
84 .. attribute:: Query.SORT
86 Defines constants that are used as the mode in which to open a database.
89 Sort by message date, oldest first.
92 Sort by message date, newest first.
95 Sort by email message ID
97 .. automethod:: set_sort
99 .. automethod:: search_threads
101 .. automethod:: search_messages
103 .. automethod:: count_messages
105 :class:`Messages` -- A bunch of messages
106 ----------------------------------------
108 .. autoclass:: Messages
110 .. automethod:: collect_tags
112 .. automethod:: __len__
114 :class:`Message` -- A single message
115 ----------------------------------------
117 .. autoclass:: Message
119 .. automethod:: get_message_id
121 .. automethod:: get_thread_id
123 .. automethod:: get_replies
125 .. automethod:: get_filename
127 .. automethod:: get_flag
129 .. automethod:: set_flag
131 .. automethod:: get_date
133 .. automethod:: get_header
135 .. automethod:: get_tags
137 .. automethod:: remove_tag
139 .. automethod:: add_tag
141 .. automethod:: remove_all_tags
143 .. automethod:: freeze
147 .. automethod:: format_as_text
149 .. automethod:: __str__
151 :class:`Tags` -- Notmuch tags
152 -----------------------------
157 .. automethod:: __len__
159 .. automethod:: __str__
161 :class:`Threads` -- Threads iterator
162 ------------------------------------
166 :class:`Thread` -- A single thread
167 ------------------------------------
171 :class:`Filenames` -- An iterator over filenames
172 ------------------------------------------------
176 :class:`Directoy` -- A directory entry in the database
177 ------------------------------------------------------
181 :exc:`NotmuchError` -- A Notmuch execution error
182 ------------------------------------------------
183 .. autoexception:: NotmuchError
186 This execption inherits directly from :exc:`Exception` and is raised on errors during the notmuch execution.
188 :class:`STATUS` -- Notmuch operation return status
189 --------------------------------------------------
190 .. autoclass:: STATUS