From: Sebastian Spaeth Date: Tue, 18 May 2010 22:15:14 +0000 (-0700) Subject: Merge branch 'master' of git://git.notmuchmail.org/git/notmuch-wiki X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=c1449672b57e43b29df327ee07d5a2f47f99b7ea;hp=9c27922986ea4e9760c33dcc964e2fb6e545d3ed;p=obsolete%2Fnotmuch-wiki Merge branch 'master' of git://git.notmuchmail.org/git/notmuch-wiki --- diff --git a/howto.mdwn b/howto.mdwn new file mode 100644 index 0000000..30e8134 --- /dev/null +++ b/howto.mdwn @@ -0,0 +1,13 @@ +[[!img notmuch-logo.png alt="Notmuch logo" class="left"]] +#How to... + +##.. print only filenames of a search + +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: + + #!/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()