Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2FB20429E26 for ; Sat, 10 May 2014 12:13:56 -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 nYgVbRFFCKqA for ; Sat, 10 May 2014 12:13:48 -0700 (PDT) Received: from qmta08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by olra.theworths.org (Postfix) with ESMTP id 4A278431FC7 for ; Sat, 10 May 2014 12:13:34 -0700 (PDT) Received: from omta20.westchester.pa.mail.comcast.net ([76.96.62.71]) by qmta08.westchester.pa.mail.comcast.net with comcast id 0K6m1o0031YDfWL58KDW9e; Sat, 10 May 2014 19:13:30 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta20.westchester.pa.mail.comcast.net with comcast id 0KDV1o00N152l3L3gKDWwU; Sat, 10 May 2014 19:13:30 +0000 Received: from mjolnir.tremily.us (unknown [192.168.0.140]) by odin.tremily.us (Postfix) with ESMTPS id 233C6119F47B; Sat, 10 May 2014 12:13:29 -0700 (PDT) Received: (nullmailer pid 7441 invoked by uid 1000); Sat, 10 May 2014 19:12:55 -0000 From: "W. Trevor King" To: notmuch@notmuchmail.org Subject: [PATCH 5/5] nmbug-status: Shift the script description into a docstring Date: Sat, 10 May 2014 12:12:49 -0700 Message-Id: <983e6540ad12f69cd5c82a442282e26a4cbf6335.1399748615.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=1399749210; bh=bz4oE7HbPJE1smC/TZszPDNsONZ8HVvk5yzL4IbISUU=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-Id; b=hawBnwEfTFmArzs3vHuKw6TrIToLrRdfW2DORd2jlhDleE8ZeMDlrOn4YaWANFfSh 8GAE16iIDyghR0dIT0119HD9dRJsGA2ofEimUOOhV/UrRas22K2rk1xkuyEsi4HF02 NdRefTYm1MivgC5E5dW+S8obLJWAkxppE4SpWYN43T0nT8aQveHVVHymnvuOwm5rvu SGbWXjITPut9XQ6TFLThSNUhAmzKT1/l+4zc2IfPm/vtO+u2ZPpVl1Y3lqp44C9MlI AmT6Ell/KbCm7dKm1pRPKkF8O8xK45//kPfWXkTGkh8DLiwDJ2fRETz1Ihjw7Qs8PU KBn59HjeGbqEA== 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, 10 May 2014 19:13:56 -0000 This way we can use it as the ArgumentParser description (formatted with 'nmbug-status --help') and script readers still have it near the top of the file. I rephrased things a bit to match PEP 257's summary-line-and-body format [1] while elaborating on the "if available" Gmane views. [1]: http://legacy.python.org/dev/peps/pep-0257/#multi-line-docstrings --- devel/nmbug/nmbug-status | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index c9cc745..926d4e4 100755 --- a/devel/nmbug/nmbug-status +++ b/devel/nmbug/nmbug-status @@ -1,8 +1,5 @@ #!/usr/bin/python # -# Generate an HTML page with the result of one or more notmuch -# searches, (with links to gmane views of each email if available). -# # Copyright (c) 2011-2012 David Bremner # # dependencies @@ -22,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 @@ -258,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