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