* [PATCH 1/5] Add explicit license information
2014-05-10 19:12 [PATCH 0/5] nmbug-status fixups from notmuch-to-html W. Trevor King
@ 2014-05-10 19:12 ` W. Trevor King
2014-05-10 19:12 ` [PATCH 2/5] Move the generated date from the top of the page to the footer W. Trevor King
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: W. Trevor King @ 2014-05-10 19:12 UTC (permalink / raw)
To: notmuch
From: Carl Worth <cworth@cworth.org>
The "same license as notmuch" text was probably fine when the file was
contained within the notmuch source repository, but here, externally,
we should be explicit.
---
The "externally" reference in patch 1/5 won't apply if this commit
lands in master. I'm not sure it's worth changing though. I don't
mind either way, and I didn't want to change it without Carl's
permission.
Cheers,
Trevor
devel/nmbug/nmbug-status | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index 03621bd..a7c7920 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -1,10 +1,23 @@
#!/usr/bin/python
#
# Copyright (c) 2011-2012 David Bremner <david@tethera.net>
-# License: Same as notmuch
+#
# dependencies
# - python 2.6 for json
# - argparse; either python 2.7, or install separately
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see http://www.gnu.org/licenses/ .
from __future__ import print_function
from __future__ import unicode_literals
--
1.9.1.353.gc66d89d
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/5] Move the generated date from the top of the page to the footer.
2014-05-10 19:12 [PATCH 0/5] nmbug-status fixups from notmuch-to-html W. Trevor King
2014-05-10 19:12 ` [PATCH 1/5] Add explicit license information W. Trevor King
@ 2014-05-10 19:12 ` W. Trevor King
2014-05-10 19:12 ` [PATCH 3/5] nmbug-status: Use a triple-quoted string for the footer template W. Trevor King
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: W. Trevor King @ 2014-05-10 19:12 UTC (permalink / raw)
To: notmuch
From: Carl Worth <cworth@cworth.org>
It's useful reference information, but anyone who wants it will look
for and find it. We don't need this front-and-center.
---
devel/nmbug/nmbug-status | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index a7c7920..b4f9829 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -312,18 +312,15 @@ _PAGES['html'] = HtmlPage(
</head>
<body>
<h2>{title}</h2>
-<p>
-Generated: {date}<br />
{blurb}
</p>
<h3>Views</h3>
-'''.format(date=datetime.datetime.utcnow().date(),
- title=config['meta']['title'],
+'''.format(title=config['meta']['title'],
blurb=config['meta']['blurb'],
encoding=_ENCODING,
inter_message_padding='0.25em',
border_radius='0.5em'),
- footer='</body>\n</html>\n',
+ footer='<hr><p>Generated: {date}</body>\n</html>\n'.format(date=datetime.datetime.utcnow().date())
)
if args.list_views:
--
1.9.1.353.gc66d89d
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/5] nmbug-status: Use a triple-quoted string for the footer template
2014-05-10 19:12 [PATCH 0/5] nmbug-status fixups from notmuch-to-html W. Trevor King
2014-05-10 19:12 ` [PATCH 1/5] Add explicit license information W. Trevor King
2014-05-10 19:12 ` [PATCH 2/5] Move the generated date from the top of the page to the footer W. Trevor King
@ 2014-05-10 19:12 ` W. Trevor King
2014-05-10 19:12 ` [PATCH 4/5] Add a comment describing the program W. Trevor King
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: W. Trevor King @ 2014-05-10 19:12 UTC (permalink / raw)
To: notmuch
Follow the pattern set by our header template and avoid the long line.
---
devel/nmbug/nmbug-status | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index b4f9829..e14fecd 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -320,7 +320,12 @@ _PAGES['html'] = HtmlPage(
encoding=_ENCODING,
inter_message_padding='0.25em',
border_radius='0.5em'),
- footer='<hr><p>Generated: {date}</body>\n</html>\n'.format(date=datetime.datetime.utcnow().date())
+ footer='''
+<hr>
+<p>Generated: {date}
+</body>
+</html>
+'''.format(date=datetime.datetime.utcnow().date())
)
if args.list_views:
--
1.9.1.353.gc66d89d
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/5] Add a comment describing the program
2014-05-10 19:12 [PATCH 0/5] nmbug-status fixups from notmuch-to-html W. Trevor King
` (2 preceding siblings ...)
2014-05-10 19:12 ` [PATCH 3/5] nmbug-status: Use a triple-quoted string for the footer template W. Trevor King
@ 2014-05-10 19:12 ` W. Trevor King
2014-05-10 19:12 ` [PATCH 5/5] nmbug-status: Shift the script description into a docstring W. Trevor King
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: W. Trevor King @ 2014-05-10 19:12 UTC (permalink / raw)
To: notmuch
From: Carl Worth <cworth@cworth.org>
It's quite simple, really.
---
devel/nmbug/nmbug-status | 3 +++
1 file changed, 3 insertions(+)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index e14fecd..c9cc745 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -1,5 +1,8 @@
#!/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 <david@tethera.net>
#
# dependencies
--
1.9.1.353.gc66d89d
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/5] nmbug-status: Shift the script description into a docstring
2014-05-10 19:12 [PATCH 0/5] nmbug-status fixups from notmuch-to-html W. Trevor King
` (3 preceding siblings ...)
2014-05-10 19:12 ` [PATCH 4/5] Add a comment describing the program W. Trevor King
@ 2014-05-10 19:12 ` W. Trevor King
2014-05-10 21:08 ` [PATCH 0/5] nmbug-status fixups from notmuch-to-html Tomi Ollila
[not found] ` <87fvkgf87n.fsf@yoom.home.cworth.org>
6 siblings, 0 replies; 9+ messages in thread
From: W. Trevor King @ 2014-05-10 19:12 UTC (permalink / raw)
To: notmuch
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 <david@tethera.net>
#
# 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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/5] nmbug-status fixups from notmuch-to-html
2014-05-10 19:12 [PATCH 0/5] nmbug-status fixups from notmuch-to-html W. Trevor King
` (4 preceding siblings ...)
2014-05-10 19:12 ` [PATCH 5/5] nmbug-status: Shift the script description into a docstring W. Trevor King
@ 2014-05-10 21:08 ` Tomi Ollila
2014-05-10 22:39 ` [PATCH] nmbug-status: Make the footer's <hr> gray W. Trevor King
[not found] ` <87fvkgf87n.fsf@yoom.home.cworth.org>
6 siblings, 1 reply; 9+ messages in thread
From: Tomi Ollila @ 2014-05-10 21:08 UTC (permalink / raw)
To: W. Trevor King, notmuch
On Sat, May 10 2014, "W. Trevor King" <wking@tremily.us> wrote:
> I've cherry-picked the three patches I liked from Carl's master [1,2]
> and added two cleanup commits of my own. I've left Carl's commit
> messages unchanged. I'm fine squashing my fixups into Carl's
> originals (leaving Carl as the author) if that's ok with him.
I think the series is good as it is.
I like seeing something after last patch at the end of the page -- It makes
it easier to notice when patches end. Perhaps I get used to see date
there.
The rendered <hr/> irritates me a bit, though. Maybe it could be colored
light gray ?
> Cheers,
> Trevor
Tomi
>
> [1]: id:20140423001824.GM9243@odin.tremily.us
> http://thread.gmane.org/gmane.mail.notmuch.general/17986/focus=17994
> [2]: git://git.cworth.org/git/notmuch-to-html
>
> Carl Worth (3):
> Add explicit license information
> Move the generated date from the top of the page to the footer.
> Add a comment describing the program
>
> W. Trevor King (2):
> nmbug-status: Use a triple-quoted string for the footer template
> nmbug-status: Shift the script description into a docstring
>
> devel/nmbug/nmbug-status | 36 +++++++++++++++++++++++++++++-------
> 1 file changed, 29 insertions(+), 7 deletions(-)
>
> --
> 1.9.1.353.gc66d89d
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] nmbug-status: Make the footer's <hr> gray
2014-05-10 21:08 ` [PATCH 0/5] nmbug-status fixups from notmuch-to-html Tomi Ollila
@ 2014-05-10 22:39 ` W. Trevor King
0 siblings, 0 replies; 9+ messages in thread
From: W. Trevor King @ 2014-05-10 22:39 UTC (permalink / raw)
To: notmuch; +Cc: Tomi Ollila
So it's less agressive. IE uses 'color' for drawing the rule, while
Gecko and Opera use the border or 'background-color' [1].
[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=239386
---
On Sun, May 11, 2014 at 12:08:10AM +0300, Tomi Ollila wrote:
> The rendered <hr/> irritates me a bit, though. Maybe it could be
> colored light gray ?
I can't reroll that one myself, unless Carl gives the ok. But here's
some light-gray styling as an additional patch.
Cheers,
Trevor
devel/nmbug/nmbug-status | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index 926d4e4..c92d268 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -315,6 +315,12 @@ _PAGES['html'] = HtmlPage(
tbody:nth-child(4n+3) tr td {{
background-color: #bce;
}}
+ hr {{
+ border: 0;
+ height: 1px;
+ color: #ccc;
+ background-color: #ccc;
+ }}
</style>
</head>
<body>
--
1.9.1.353.gc66d89d
^ permalink raw reply related [flat|nested] 9+ messages in thread
[parent not found: <87fvkgf87n.fsf@yoom.home.cworth.org>]
* Re: [PATCH 0/5] nmbug-status fixups from notmuch-to-html
[not found] ` <87fvkgf87n.fsf@yoom.home.cworth.org>
@ 2014-05-12 0:36 ` W. Trevor King
0 siblings, 0 replies; 9+ messages in thread
From: W. Trevor King @ 2014-05-12 0:36 UTC (permalink / raw)
To: Carl Worth; +Cc: notmuch
[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]
On Sun, May 11, 2014 at 12:04:12PM -0700, Carl Worth wrote:
> "W. Trevor King" <wking@tremily.us> writes:
> > I've cherry-picked the three patches I liked from Carl's master [1,2]
> > and added two cleanup commits of my own. I've left Carl's commit
> > messages unchanged. I'm fine squashing my fixups into Carl's
> > originals (leaving Carl as the author) if that's ok with him.
>
> Please feel free to do whatever you like with any of these.
Thanks :). If folks do want a reroll, I think the following squash
groups make sense:
* Move the generated date from the top of the page to the footer
* nmbug-status: Use a triple-quoted string for the footer template
* nmbug-status: Make the footer's <hr> gray
* Add a comment describing the program
* nmbug-status: Shift the script description into a docstring
I'll wait another week or so for additional feedback on v1, and then
squash and submit v2.
Cheers,
Trevor
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread