X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch;h=172464c10bc3009383aac01a01db4f5990281ec1;hp=56f961b47d581f68172d2e9114b9190d6ff7a10d;hb=4081ed75b5e1d0315925bd2fcefb728b315f4f4b;hpb=3b2d73c684501e2eb906542f5081125d4e9c485d diff --git a/notmuch b/notmuch index 56f961b4..172464c1 100755 --- a/notmuch +++ b/notmuch @@ -135,9 +135,17 @@ if __name__ == '__main__': querystr = quote_query_line(sys.argv[2:]) logging.debug("search-term "+querystr) db = Database() - m = Query(db,querystr).search_messages() + q = Query(db,querystr) + #TODO: notmuch_query_set_sort (query, NOTMUCH_SORT_MESSAGE_ID); + m = q.search_messages() print("\n".join([t for t in m.collect_tags()])) + elif sys.argv[1] == 'dump': + db = Database() + msgs = Query(db,'').search_messages() + for msg in msgs: + print("%s (%s)" % (msg.get_message_id(), msg.get_tags())) + else: # unknown command print "Error: Unknown command '%s' (see \"notmuch help\")" % sys.argv[1] @@ -153,10 +161,6 @@ show [...] Show all messages matching the search terms. -count [...] - - Count messages matching the search terms. - reply [options...] [...] Construct a reply template for a set of messages.