X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch;h=c89777e33c8b39b4fce28ddc9d89238650845fc3;hp=abd44854e3c404f0d121f73186d67a26b40216c8;hb=e026813bcb623bff70895a353aeef90364f66795;hpb=7b9ddcb6a63b29f7088674e1590224b484d8a11d diff --git a/notmuch b/notmuch index abd44854..c89777e3 100755 --- a/notmuch +++ b/notmuch @@ -1,11 +1,8 @@ #!/usr/bin/env python """This is a notmuch implementation in python. It's goal is to allow running the test suite on the cnotmuch python bindings.""" -import sys - -def init_notmuch(): - import os - from cnotmuch import notmuch - #TODO Handle variable: NOTMUCH-CONFIG +import sys, os +from cnotmuch.notmuch import Database, Query +#TODO Handle variable: NOTMUCH-CONFIG #------------------------------------------------------------------------- HELPTEXT="""The notmuch mail system. @@ -104,6 +101,13 @@ if __name__ == '__main__': elif sys.argv[1] == 'new': #TODO: handle --verbose print "Not implemented." + + elif sys.argv[1] == 'search-tags': + if len(sys.argv) == 2: + print("\n".join(Database().get_all_tags())) + + else: print "Not implemented" + else: # unknown command print "Error: Unknown command '%s' (see \"notmuch help\")" % sys.argv[1]