]> git.notmuchmail.org Git - notmuch/blob - README
Query(): Fix _nmlib -> nmlib type & clarify docs a bit
[notmuch] / README
1 cnotmuch -- The python interface to notmuch.so
2 ==============================================
3 To create the documentation with sphinx installed, go to the docs directory and
4 "make html". A static version of the documentation is available at:
5
6 http://spaetz.bitbucket.org
7
8 All code is available under the GNU GPLv3+ (see docs/COPYING) unless specified otherwise.
9
10 Usage
11 -----
12 For more examples of how to use the cnotmuch interface, have a look at the
13 notmuch "binary" and the generated documentation.
14
15 Example session:
16 >>>from cnotmuch import notmuch
17 >>>db = notmuch.Database("/home/spaetz/mail")
18 db.get_path()
19 '/home/spaetz/mail'
20 >>>tags = db.get_all_tags()
21 >>>for tag in tags: 
22 >>>  print tag
23 inbox
24 ...
25 maildir::draft
26 #---------------------------------------------
27
28 q = notmuch.Query(db,'from:Sebastian')
29 count = len(q.search_messages())
30 1300
31
32 #---------------------------------------------
33
34 >>>db = notmuch.Database("/home/spaetz/mailHAHA")
35 NotmuchError: Could not open the specified database
36
37 #---------------------------------------------
38
39 >>>tags = notmuch.Database("/home/spaetz/mail").get_all_tags()
40 >>>del(tags)