2 """This is a notmuch implementation in python. It's goal is to allow running the test suite on the cnotmuch python bindings."""
4 #-------------------------------------------------------------------------
5 HELPTEXT="""The notmuch mail system.
7 Usage: notmuch <command> [args...]
9 Where <command> and [args...] are as follows:
11 setup Interactively setup notmuch for first use.
15 Find and import new messages to the notmuch database.
17 search [options...] <search-terms> [...]
19 Search for messages matching the given search terms.
21 show <search-terms> [...]
23 Show all messages matching the search terms.
25 count <search-terms> [...]
27 Count messages matching the search terms.
29 reply [options...] <search-terms> [...]
31 Construct a reply template for a set of messages.
33 tag +<tag>|-<tag> [...] [--] <search-terms> [...]
35 Add/remove tags for all messages matching the search terms.
39 Create a plain-text dump of the tags for each message.
43 Restore the tags from the given dump file (see 'dump').
45 search-tags [<search-terms> [...] ]
47 List all tags found in the database or matching messages.
51 This message, or more detailed help for the named command.
53 Use "notmuch help <command>" for more details on each command.
54 And "notmuch help search-terms" for the common search-terms syntax.
57 #TODO: replace the dynamic pieces
58 USAGE="""Notmuch is configured and appears to have a database. Excellent!
60 At this point you can start exploring the functionality of notmuch by
61 using commands such as:
63 notmuch search tag:inbox
65 notmuch search to:"Sebastian Spaeth"
67 notmuch search from:"Sebastian@SSpaeth.de"
69 notmuch search subject:"my favorite things"
71 See "notmuch help search" for more details.
73 You can also use "notmuch show" with any of the thread IDs resulting
74 from a search. Finally, you may want to explore using a more sophisticated
75 interface to notmuch such as the emacs interface implemented in notmuch.el
76 or any other interface described at http://notmuchmail.org
78 And don't forget to run "notmuch new" whenever new mail arrives.
80 Have fun, and may your inbox never have much mail.
82 #-------------------------------------------------------------------------
83 if __name__ == '__main__':
85 # Handle command line options
87 if len(sys.argv) == 1:
90 elif sys.argv[1] == 'setup':
91 """ Interactively setup notmuch for first use. """
92 print "Not implemented."
94 elif sys.argv[1] == 'help':
95 if len(sys.argv) == 2: print HELPTEXT
96 else: print "Not implemented"
100 print "Error: Unknown command '%s' (see \"notmuch help\")" % sys.argv[1]
107 Find and import new messages to the notmuch database.
109 search [options...] <search-terms> [...]
111 Search for messages matching the given search terms.
113 show <search-terms> [...]
115 Show all messages matching the search terms.
117 count <search-terms> [...]
119 Count messages matching the search terms.
121 reply [options...] <search-terms> [...]
123 Construct a reply template for a set of messages.
125 tag +<tag>|-<tag> [...] [--] <search-terms> [...]
127 Add/remove tags for all messages matching the search terms.
131 Create a plain-text dump of the tags for each message.
134 search-tags [<search-terms> [...] ]
136 List all tags found in the database or matching messages.