From 2e9c7aba99598eafd7b5fc52897da14ea13af216 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Wed, 24 Mar 2010 07:21:20 +0000 Subject: notmuch: Add a 'part' subcommand A new 'part' subcommand allows the user to extract a single part from a MIME message. Usage: notmuch part --part= The search terms must match only a single message (e.g. id:foo@bar.com). The part number specified refers to the part identifiers output by `notmuch show'. The content of the part is written the stdout with no formatting or identification marks. It is not JSON formatted. --- notmuch.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'notmuch.c') diff --git a/notmuch.c b/notmuch.c index 95f057e..6ebe36d 100644 --- a/notmuch.c +++ b/notmuch.c @@ -294,6 +294,17 @@ command_t commands[] = { "\t\tcontain tags only from messages that match the search-term(s).\n" "\n" "\t\tIn both cases the list will be alphabetically sorted." }, + { "part", notmuch_part_command, + "--part= ", + "\t\tOutput a single MIME part of a message.", + "\t\tA single decoded MIME part, with no encoding or framing,\n" + "\t\tis output to stdout. The search terms must match only a single\n" + "\t\tmessage, otherwise this command will fail.\n" + "\n" + "\t\tThe part number should match the part \"id\" field output\n" + "\t\tby the \"--format=json\" option of \"notmuch show\". If the\n" + "\t\tmessage specified by the search terms does not include a\n" + "\t\tpart with the specified \"id\" there will be no output." }, { "help", notmuch_help_command, "[]", "\t\tThis message, or more detailed help for the named command.", -- cgit v1.2.3