]> git.notmuchmail.org Git - notmuch/blob - docs/source/index.rst
docs: stub out remaining missing bindings to get a reminder
[notmuch] / docs / source / index.rst
1 .. cnotmuch documentation master file, created by
2    sphinx-quickstart on Tue Feb  2 10:00:47 2010.
3
4 .. currentmodule:: cnotmuch
5
6 Welcome to :mod:`cnotmuch`'s documentation
7 ===========================================
8
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`.
11
12 .. moduleauthor:: Sebastian Spaeth <Sebastian@SSpaeth.de>
13
14 :License: This module is covered under the GNU GPL v3 (or later).
15
16 This page contains the main API overview. More information on specific topics can be found on the following pages: (none here yet)
17
18 Notmuch can be imported as::
19
20  from cnotmuch import notmuch
21
22 or::
23
24  from cnotmuch.notmuch import Query,Database
25
26 .. toctree::
27    :maxdepth: 1
28
29
30 :mod:`notmuch` -- The Notmuch interface
31 =============================================
32
33 .. automodule:: cnotmuch.notmuch
34
35 :todo: Document nmlib,STATUS
36
37 :class:`Database` -- The underlying notmuch database
38 -----------------------------------------------------
39
40 .. autoclass:: Database([path=None[, create=False[, mode=MODE.READ_ONLY]]])
41
42    .. automethod:: create
43
44    .. automethod:: open(path, status=MODE.READ_ONLY)
45
46    .. automethod:: get_path
47
48    .. automethod:: get_version
49
50    .. automethod:: needs_upgrade
51
52    .. automethod:: upgrade
53
54    .. automethod:: get_directory
55
56    .. automethod:: add_message
57
58    .. automethod:: remove_message
59
60    .. automethod:: find_message
61
62    .. automethod:: get_all_tags
63
64
65    .. attribute:: Database.MODE
66
67      Defines constants that are used as the mode in which to open a database.
68
69      MODE.READ_ONLY
70        Open the database in read-only mode
71
72      MODE.READ_WRITE
73        Open the database in read-write mode
74
75    .. autoattribute:: db_p
76
77 :class:`Query` -- A search query
78 -----------------------------------------------
79
80 .. autoclass:: Query
81
82    .. automethod:: create
83
84    .. attribute:: Query.SORT
85
86      Defines constants that are used as the mode in which to open a database.
87
88      SORT.OLDEST_FIRST
89        Sort by message date, oldest first.
90
91      SORT.NEWEST_FIRST
92        Sort by message date, newest first.
93
94      SORT.MESSAGE_ID
95        Sort by email message ID
96
97    .. automethod:: set_sort
98
99    .. automethod:: search_threads
100
101    .. automethod:: search_messages
102
103    .. automethod:: count_messages
104
105 :class:`Messages` -- A bunch of messages
106 ----------------------------------------
107
108 .. autoclass:: Messages
109
110    .. automethod:: collect_tags
111
112    .. automethod:: __len__
113
114 :class:`Message` -- A single message
115 ----------------------------------------
116
117 .. autoclass:: Message
118
119    .. automethod:: get_message_id
120
121    .. automethod:: get_thread_id
122
123    .. automethod:: get_replies
124
125    .. automethod:: get_filename
126
127    .. automethod:: get_flag
128
129    .. automethod:: set_flag
130    
131    .. automethod:: get_date
132
133    .. automethod:: get_header
134
135    .. automethod:: get_tags
136
137    .. automethod:: remove_tag
138
139    .. automethod:: add_tag
140
141    .. automethod:: remove_all_tags
142
143    .. automethod:: freeze
144
145    .. automethod:: thaw
146
147    .. automethod:: format_as_text
148
149    .. automethod:: __str__
150
151 :class:`Tags` -- Notmuch tags
152 -----------------------------
153
154 .. autoclass:: Tags
155    :members:
156
157    .. automethod:: __len__
158
159    .. automethod:: __str__
160
161 :class:`Threads` -- Threads iterator
162 ------------------------------------
163
164 To be implemented
165
166 :class:`Thread` -- A single thread
167 ------------------------------------
168
169 To be implemented
170
171 :class:`Filenames` -- An iterator over filenames
172 ------------------------------------------------
173
174 To be implemented
175
176 :class:`Directoy` -- A directory entry in the database
177 ------------------------------------------------------
178
179 To be implemented
180
181 :exc:`NotmuchError` -- A Notmuch execution error
182 ------------------------------------------------
183 .. autoexception:: NotmuchError
184    :members:
185
186    This execption inherits directly from :exc:`Exception` and is raised on errors during the notmuch execution.
187
188 :class:`STATUS` -- Notmuch operation return status
189 --------------------------------------------------
190 .. autoclass:: STATUS
191
192    To be documented
193
194 Indices and tables
195 ==================
196
197 * :ref:`genindex`
198 * :ref:`search`
199