[PATCH v2 5/6] nmbug-status: Add the time to the footer's build-date
authorW. Trevor King <wking@tremily.us>
Sat, 31 May 2014 22:20:26 +0000 (15:20 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:03:06 +0000 (10:03 -0800)
16/f4ed004165073674450d55dbc561746324b1ab [new file with mode: 0644]

diff --git a/16/f4ed004165073674450d55dbc561746324b1ab b/16/f4ed004165073674450d55dbc561746324b1ab
new file mode 100644 (file)
index 0000000..b298642
--- /dev/null
@@ -0,0 +1,115 @@
+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 2E087431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 31 May 2014 15:21:15 -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 nz9VI0xGYrbC for <notmuch@notmuchmail.org>;\r
+       Sat, 31 May 2014 15:21:11 -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 4C947431FD7\r
+       for <notmuch@notmuchmail.org>; Sat, 31 May 2014 15:21:03 -0700 (PDT)\r
+Received: from omta07.westchester.pa.mail.comcast.net ([76.96.62.59])\r
+       by qmta04.westchester.pa.mail.comcast.net with comcast\r
+       id 8m4y1o0011GhbT854mM3zx; Sat, 31 May 2014 22:21:03 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta07.westchester.pa.mail.comcast.net with comcast\r
+       id 8mM11o00h152l3L3TmM214; Sat, 31 May 2014 22:21:03 +0000\r
+Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
+       by odin.tremily.us (Postfix) with ESMTPS id C026411F065A;\r
+       Sat, 31 May 2014 15:21:00 -0700 (PDT)\r
+Received: (nullmailer pid 13196 invoked by uid 1000);\r
+       Sat, 31 May 2014 22:20:38 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 5/6] nmbug-status: Add the time to the footer's build-date\r
+Date: Sat, 31 May 2014 15:20:26 -0700\r
+Message-Id:\r
+ <8d947211663ca195cfaaa9b2a22c87e1b26eab3d.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=1401574863;\r
+       bh=SimABtxYl9jdaCjxLXz08Z0ZjeXLQsmCdwi6CcwIcaY=;\r
+       h=Received:Received:Received:Received:From:To:Subject:Date:\r
+       Message-Id;\r
+       b=PBLuseWDmCJPEobgjyj+SbKVbDJph4q4b5+O7SiCILVry9+fCOU68M4OHyIwwOOnt\r
+       2fqXHDFB8FPAbuFzZzlE7hk03PFKknVzyrQPa0BM4cPOLZFgxFH9eQ3x8te3O0dFyT\r
+       QNP6KQ9ICdYwESdqeSk3D83qYSVqWZ3psrUCyCfxIQ4Cyms+1aSqsKmOCCze20wfzx\r
+       NUCphUKYQ467Edw16wD/wqYWiE3qfOQPpo8fIY19xG4kMK1wb12qkFAb04lRLjDb5b\r
+       9ieOguwjvk9UwEmWuSWYeDFRRW+vFGQgvLrZmfhBf4EKRKGj5bubhbkNXScGW91Qc6\r
+       bFMTAUCKUd5pg==\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:15 -0000\r
+\r
+Our repository [1] has a post-update hook that rebuilds the status\r
+page after each push.  Since that may happen several times a day, we\r
+might as well show the build time (as well as the date) in the footer.\r
+\r
+The trailing 'Z' is the ISO 8601 designator for UTC.  Now that we're\r
+showing times, it's nice to be explicit about the timezone we're\r
+using.\r
+\r
+The rename from date -> datetime gives us backward-compatibility for\r
+folks that *do* only want the date.  We keep the old date formatting\r
+to support those folks.\r
+\r
+[1]: http://nmbug.tethera.net/git/nmbug-tags.git\r
+---\r
+ devel/nmbug/nmbug-status | 6 ++++--\r
+ 1 file changed, 4 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index b7c2f80..c0bdd1b 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -275,8 +275,10 @@ parser.add_argument('--get-query', help='get query for view',\r
+ args = parser.parse_args()\r
\r
+ config = read_config(path=args.config)\r
++now = datetime.datetime.utcnow()\r
+ context = {\r
+-    'date': datetime.datetime.utcnow(),\r
++    'date': now,\r
++    'datetime': now.strftime('%Y-%m-%d %H:%M:%SZ'),\r
+     'title': config['meta']['title'],\r
+     'blurb': config['meta']['blurb'],\r
+     'encoding': _ENCODING,\r
+@@ -339,7 +341,7 @@ _PAGES['html'] = HtmlPage(\r
+ '''.format(**context),\r
+     footer='''\r
+ <hr>\r
+-<p>Generated: {date}\r
++<p>Generated: {datetime}\r
+ </body>\r
+ </html>\r
+ '''.format(**context),\r
+-- \r
+1.9.1.353.gc66d89d\r
+\r