X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=howto.mdwn;h=c62409fc9b35a2b243717202afacfd059f0afc0f;hb=849b5df14e24d4e4b7215575315b7ad515326943;hp=58868c6e474b546a33b43b95b8fda471f35b82ba;hpb=540b2879f1b505155b807bd6fcc23025b6e31297;p=notmuch-wiki diff --git a/howto.mdwn b/howto.mdwn index 58868c6..c62409f 100644 --- a/howto.mdwn +++ b/howto.mdwn @@ -1,18 +1,25 @@ [[!img notmuch-logo.png alt="Notmuch logo" class="left"]] #How to... -* .. print only filenames of a search +Some tips about how to do some useful things with notmuch, and the +various "third party" notmuch utilities. -Given you have the python bindings installed (or simply set your PYTHONPATH environment variable to point to the .../bindings/python directory), this script will print the filenames of a matching search: +* Print only filenames of a search - #!/usr/bin/env python - import sys - import notmuch - - q = notmuch.Database().create_query(" ".join(sys.argv[1:])) - for m in q.search_messages(): print m.get_filename() + Given you have the python bindings installed (or simply set your + PYTHONPATH environment variable to point to the .../bindings/python + directory), this script will print the filenames of a matching + search: -* .. sync notmuch tags and maildir flags + #!/usr/bin/env python + import sys + import notmuch + search = " ".join(sys.argv[1:]) + q = notmuch.Database().create_query(search) + for m in q.search_messages(): + print m.get_filename() + +* Sync notmuch tags and maildir flags Some IMAP users rely on maildir flags that convey the status "seen", "replied", "trashed", in order to synchronize the status of their