[PATCH v2 2/6] Add a docstring describing the program
authorW. Trevor King <wking@tremily.us>
Sat, 31 May 2014 22:20:23 +0000 (15:20 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:03:05 +0000 (10:03 -0800)
06/f06067d79e703feb833519e20f1b731603e776 [new file with mode: 0644]

diff --git a/06/f06067d79e703feb833519e20f1b731603e776 b/06/f06067d79e703feb833519e20f1b731603e776
new file mode 100644 (file)
index 0000000..c47f60b
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <wking@tremily.us>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 30C0D431FDA\r
+       for <notmuch@notmuchmail.org>; Sat, 31 May 2014 15:21:07 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id JWYJHlp9WfPX for <notmuch@notmuchmail.org>;\r
+       Sat, 31 May 2014 15:21:02 -0700 (PDT)\r
+Received: from qmta04.westchester.pa.mail.comcast.net\r
+       (qmta04.westchester.pa.mail.comcast.net [76.96.62.40])\r
+       by olra.theworths.org (Postfix) with ESMTP id 79068431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 31 May 2014 15:21:02 -0700 (PDT)\r
+Received: from omta14.westchester.pa.mail.comcast.net ([76.96.62.60])\r
+       by qmta04.westchester.pa.mail.comcast.net with comcast\r
+       id 8mEw1o0011HzFnQ54mM1zp; Sat, 31 May 2014 22:21:01 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta14.westchester.pa.mail.comcast.net with comcast\r
+       id 8mLz1o00K152l3L3amM06H; Sat, 31 May 2014 22:21:01 +0000\r
+Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
+       by odin.tremily.us (Postfix) with ESMTPS id 48CA311F0656;\r
+       Sat, 31 May 2014 15:20:59 -0700 (PDT)\r
+Received: (nullmailer pid 13190 invoked by uid 1000);\r
+       Sat, 31 May 2014 22:20:37 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 2/6] Add a docstring describing the program\r
+Date: Sat, 31 May 2014 15:20:23 -0700\r
+Message-Id:\r
+ <3fd7775920639484fafb788dee39db32c63d9ea0.1401574293.git.wking@tremily.us>\r
+X-Mailer: git-send-email 1.9.1.353.gc66d89d\r
+In-Reply-To: <cover.1401574293.git.wking@tremily.us>\r
+References: <cover.1401574293.git.wking@tremily.us>\r
+In-Reply-To: <cover.1401574293.git.wking@tremily.us>\r
+References: <cover.1401574293.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20140121; t=1401574861;\r
+       bh=a1eKs4xsWxjsjLCVuMiDaII0HSbegLDZaixtHeKApa8=;\r
+       h=Received:Received:Received:Received:From:To:Subject:Date:\r
+       Message-Id;\r
+       b=JbSnfjuT9QUrpRr/muSQ9mCqLSEJj/w5XkNwWEO35naMkQMygTE2Ru04g2Bf1nycP\r
+       PVEmkTX4HslirxEs2nUYxnNLskT0jCSSeUfxnMyfN0biuy1ciKWf7Y5sLlcBbfqKai\r
+       z/R5lnOAgKst76iN/pzcr4iFbzJhXyEDaK9Z0Sy2kDeNhKl6HvUfUTBss9KgpKbu1w\r
+       HbawtF3genf3qTNhuxSRZUB1O1/o1gXe6MY5mJcAtQ4W2Lj2apT1K9l8iGHQwAjHa8\r
+       eohisLUVpItYxMzGEO702DBSbpHa+38wyfiR7lCt50tOfAr6IHvrlTqu9pC8d28zy5\r
+       QoSnQfc3RsgPQ==\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 31 May 2014 22:21:07 -0000\r
+\r
+From: Carl Worth <cworth@cworth.org>\r
+\r
+Prefer a docstring to a header comment so we can use it as the\r
+ArgumentParser description (formatted with 'nmbug-status --help').\r
+Script readers still have it near the top of the file.  Since it's a\r
+docstring, use PEP 257's summary-line-and-body format [1].\r
+\r
+[1]: http://legacy.python.org/dev/peps/pep-0257/#multi-line-docstrings\r
+---\r
+ devel/nmbug/nmbug-status | 9 ++++++++-\r
+ 1 file changed, 8 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index a7c7920..e137a90 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -19,6 +19,13 @@\r
+ # You should have received a copy of the GNU General Public License\r
+ # along with this program.  If not, see http://www.gnu.org/licenses/ .\r
\r
++"""Generate HTML for one or more notmuch searches.\r
++\r
++Messages matching each search are grouped by thread.  Each message\r
++that contains both a subject and message-id will have the displayed\r
++subject link to the Gmane view of the message.\r
++"""\r
++\r
+ from __future__ import print_function\r
+ from __future__ import unicode_literals\r
\r
+@@ -255,7 +262,7 @@ class HtmlPage (Page):\r
+     def _slug(self, string):\r
+         return self._slug_regexp.sub('-', string)\r
\r
+-parser = argparse.ArgumentParser()\r
++parser = argparse.ArgumentParser(description=__doc__)\r
+ parser.add_argument('--text', help='output plain text format',\r
+                     action='store_true')\r
+ parser.add_argument('--config', help='load config from given file',\r
+-- \r
+1.9.1.353.gc66d89d\r
+\r