Re: [PATCH 3/5] nmbug-status: Add an nmbug-status(5) man page
[notmuch-archives.git] / 16 / f4ed004165073674450d55dbc561746324b1ab
1 Return-Path: <wking@tremily.us>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 2E087431FAE\r
6         for <notmuch@notmuchmail.org>; Sat, 31 May 2014 15:21:15 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: 0\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
13         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id nz9VI0xGYrbC for <notmuch@notmuchmail.org>;\r
18         Sat, 31 May 2014 15:21:11 -0700 (PDT)\r
19 Received: from qmta04.westchester.pa.mail.comcast.net\r
20         (qmta04.westchester.pa.mail.comcast.net [76.96.62.40])\r
21         by olra.theworths.org (Postfix) with ESMTP id 4C947431FD7\r
22         for <notmuch@notmuchmail.org>; Sat, 31 May 2014 15:21:03 -0700 (PDT)\r
23 Received: from omta07.westchester.pa.mail.comcast.net ([76.96.62.59])\r
24         by qmta04.westchester.pa.mail.comcast.net with comcast\r
25         id 8m4y1o0011GhbT854mM3zx; Sat, 31 May 2014 22:21:03 +0000\r
26 Received: from odin.tremily.us ([24.18.63.50])\r
27         by omta07.westchester.pa.mail.comcast.net with comcast\r
28         id 8mM11o00h152l3L3TmM214; Sat, 31 May 2014 22:21:03 +0000\r
29 Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
30         by odin.tremily.us (Postfix) with ESMTPS id C026411F065A;\r
31         Sat, 31 May 2014 15:21:00 -0700 (PDT)\r
32 Received: (nullmailer pid 13196 invoked by uid 1000);\r
33         Sat, 31 May 2014 22:20:38 -0000\r
34 From: "W. Trevor King" <wking@tremily.us>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH v2 5/6] nmbug-status: Add the time to the footer's build-date\r
37 Date: Sat, 31 May 2014 15:20:26 -0700\r
38 Message-Id:\r
39  <8d947211663ca195cfaaa9b2a22c87e1b26eab3d.1401574293.git.wking@tremily.us>\r
40 X-Mailer: git-send-email 1.9.1.353.gc66d89d\r
41 In-Reply-To: <cover.1401574293.git.wking@tremily.us>\r
42 References: <cover.1401574293.git.wking@tremily.us>\r
43 In-Reply-To: <cover.1401574293.git.wking@tremily.us>\r
44 References: <cover.1401574293.git.wking@tremily.us>\r
45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
46         s=q20140121; t=1401574863;\r
47         bh=SimABtxYl9jdaCjxLXz08Z0ZjeXLQsmCdwi6CcwIcaY=;\r
48         h=Received:Received:Received:Received:From:To:Subject:Date:\r
49         Message-Id;\r
50         b=PBLuseWDmCJPEobgjyj+SbKVbDJph4q4b5+O7SiCILVry9+fCOU68M4OHyIwwOOnt\r
51         2fqXHDFB8FPAbuFzZzlE7hk03PFKknVzyrQPa0BM4cPOLZFgxFH9eQ3x8te3O0dFyT\r
52         QNP6KQ9ICdYwESdqeSk3D83qYSVqWZ3psrUCyCfxIQ4Cyms+1aSqsKmOCCze20wfzx\r
53         NUCphUKYQ467Edw16wD/wqYWiE3qfOQPpo8fIY19xG4kMK1wb12qkFAb04lRLjDb5b\r
54         9ieOguwjvk9UwEmWuSWYeDFRRW+vFGQgvLrZmfhBf4EKRKGj5bubhbkNXScGW91Qc6\r
55         bFMTAUCKUd5pg==\r
56 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Sat, 31 May 2014 22:21:15 -0000\r
70 \r
71 Our repository [1] has a post-update hook that rebuilds the status\r
72 page after each push.  Since that may happen several times a day, we\r
73 might as well show the build time (as well as the date) in the footer.\r
74 \r
75 The trailing 'Z' is the ISO 8601 designator for UTC.  Now that we're\r
76 showing times, it's nice to be explicit about the timezone we're\r
77 using.\r
78 \r
79 The rename from date -> datetime gives us backward-compatibility for\r
80 folks that *do* only want the date.  We keep the old date formatting\r
81 to support those folks.\r
82 \r
83 [1]: http://nmbug.tethera.net/git/nmbug-tags.git\r
84 ---\r
85  devel/nmbug/nmbug-status | 6 ++++--\r
86  1 file changed, 4 insertions(+), 2 deletions(-)\r
87 \r
88 diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
89 index b7c2f80..c0bdd1b 100755\r
90 --- a/devel/nmbug/nmbug-status\r
91 +++ b/devel/nmbug/nmbug-status\r
92 @@ -275,8 +275,10 @@ parser.add_argument('--get-query', help='get query for view',\r
93  args = parser.parse_args()\r
94  \r
95  config = read_config(path=args.config)\r
96 +now = datetime.datetime.utcnow()\r
97  context = {\r
98 -    'date': datetime.datetime.utcnow(),\r
99 +    'date': now,\r
100 +    'datetime': now.strftime('%Y-%m-%d %H:%M:%SZ'),\r
101      'title': config['meta']['title'],\r
102      'blurb': config['meta']['blurb'],\r
103      'encoding': _ENCODING,\r
104 @@ -339,7 +341,7 @@ _PAGES['html'] = HtmlPage(\r
105  '''.format(**context),\r
106      footer='''\r
107  <hr>\r
108 -<p>Generated: {date}\r
109 +<p>Generated: {datetime}\r
110  </body>\r
111  </html>\r
112  '''.format(**context),\r
113 -- \r
114 1.9.1.353.gc66d89d\r
115 \r