Avoid:
$ make HAVE_SPHINX=0 HAVE_RST2MAN=1 build-man
python ./doc/prerst2man.py ./doc doc/_build/man
Traceback (most recent call last):
File "./doc/prerst2man.py", line 65, in
os.system('set -x; rst2man {0} {1}/{2}.{3}'
NameError: name 'os' is not defined
make: ***
Python 3 only supports the 0oXXX notation for octal literals [1,2],
which have also been supported in 2.x since 2.6 [2].
[1]: https://docs.python.org/3.0/whatsnew/3.0.html#integers
[2]: http://legacy.python.org/dev/peps/pep-3127/
---
doc/prerst2man.py | 4 ++--
1 file changed, 2 insertions(+), 2
Before this patch, the open was unnecessarily early and relied on the
process cleanup to close. Neither one of these was a real problem,
but PEP 343's context managers (which landed in Python 2.5) make
proper cleanup very easy.
[1]: http://legacy.python.org/dev/peps/pep-0343/
---
excefile is gone in Python 3 [1]. Instead of exec-ing the
configuration, it's easier to insert the source directory in Python's
path [2], and just import the configuration. With this change,
mkdocdeps.py is compatible with both Python 2 and 3.
[1]:
ll 3s). I haven't checked the logic though, and I'm not
running 3.2 locally anymore, so it's not a big priority for me.
Cheers,
Trevor
[1]:
https://docs.python.org/3/whatsnew/3.3.html#pep-414-explicit-unicode-literals
[2]: from __future__ import unicode_literals
W. Trevor King (7):
doc/mkdocdeps.p
On Sun, Feb 16, 2014 at 07:46:29PM -0400, David Bremner wrote:
> pushed the last 4.
It looks like there's still a nmbug-status branch on
git://notmuchmail.org/git/notmuch. It's an ancestor of debian/0.17-4,
and nmbug-status development seems to have calmed back down, so that
branch can probably
On Sun, Feb 16, 2014 at 07:46:29PM -0400, David Bremner wrote:
pushed the last 4.
It looks like there's still a nmbug-status branch on
git://notmuchmail.org/git/notmuch. It's an ancestor of debian/0.17-4,
and nmbug-status development seems to have calmed back down, so that
branch can probably
haven't checked the logic though, and I'm not
running 3.2 locally anymore, so it's not a big priority for me.
Cheers,
Trevor
[1]:
https://docs.python.org/3/whatsnew/3.3.html#pep-414-explicit-unicode-literals
[2]: from __future__ import unicode_literals
W. Trevor King (7):
doc/mkdocdeps.py
excefile is gone in Python 3 [1]. Instead of exec-ing the
configuration, it's easier to insert the source directory in Python's
path [2], and just import the configuration. With this change,
mkdocdeps.py is compatible with both Python 2 and 3.
[1]:
Avoid:
$ make HAVE_SPHINX=0 HAVE_RST2MAN=1 build-man
python ./doc/prerst2man.py ./doc doc/_build/man
Traceback (most recent call last):
File ./doc/prerst2man.py, line 65, in module
os.system('set -x; rst2man {0} {1}/{2}.{3}'
NameError: name 'os' is not defined
make: ***
Before this patch, the open was unnecessarily early and relied on the
process cleanup to close. Neither one of these was a real problem,
but PEP 343's context managers (which landed in Python 2.5) make
proper cleanup very easy.
[1]: http://legacy.python.org/dev/peps/pep-0343/
---
The rst2man target was removed in 9d9a700 (doc: build man pages at
build time; introduce HAVE_SPHINX, HAVE_RST2MAN, 2014-03-13), but a
reference in the install docs slipped through. While I was removing
that reference, I also:
* Converted doc/INSTALL to reStructuredText, so I can link to Sphinx
excefile is gone in Python 3 [1]. Instead of exec-ing the
configuration, it's easier to insert the source directory in Python's
path [2], and just import the configuration. With this change,
prerst2man.py is compatible with both Python 2 and 3.
[1]:
Python 3 only supports the 0oXXX notation for octal literals [1,2],
which have also been supported in 2.x since 2.6 [2].
[1]: https://docs.python.org/3.0/whatsnew/3.0.html#integers
[2]: http://legacy.python.org/dev/peps/pep-3127/
---
doc/prerst2man.py | 4 ++--
1 file changed, 2 insertions(+), 2
On Sat, Apr 05, 2014 at 05:35:49PM -0300, David Bremner wrote:
W. Trevor King writes:
-- You can build build and install man pages with 'make install-man'
+ make build-{man|info|html|pdf}
most of those those targets now start with sphinx-
Ah, looks like that happended
On Thu, Mar 13, 2014 at 01:04:03PM +0100, Jani Nikula wrote:
This lets me use nmbug-status for publishing search views in html
outside of the nmbug context. I'm sure especially 2/2 can be done
better. If someone wants to use their mad python skillz to improve
this, it would be great. ;)
Both
On Mon, Mar 10, 2014 at 08:24:50PM +0200, Jani Nikula wrote:
> On Mon, 10 Mar 2014, "W. Trevor King" wrote:
> > Since patches 06/15 and 07/15 never made it to the list [1] (or gmane
> > [2]), I think we need to untag 06/15 in nmbug. It was tagged in
> > b3
On Sat, Mar 08, 2014 at 05:40:45PM -0400, David Bremner wrote:
> David Bremner writes:
>
> >
> > I decided that the benefits of being to really apply and test the
> > patch series outweighed the fact that one of patchs is about
> > 150K. Apologies to those of you on GSM modems and the like.
> >
With two branches getting fetched (master and config), the branch
referenced by FETCH_HEAD is ambiguous. For example, I have:
$ cat FETCH_HEAD
41d7bfa7184cc93c9dac139d1674e9530799e3b0 \
not-for-merge branch 'config' of http://nmbug.tethera.net/git/nmbug-tags
With two branches getting fetched (master and config), the branch
referenced by FETCH_HEAD is ambiguous. For example, I have:
$ cat FETCH_HEAD
41d7bfa7184cc93c9dac139d1674e9530799e3b0 \
not-for-merge branch 'config' of http://nmbug.tethera.net/git/nmbug-tags
On Sat, Mar 08, 2014 at 08:26:33AM -0800, W. Trevor King wrote:
> That's going to create ~/.nmbug/.git though, if we want to preserve
> the current bare-style ~/.nmbug/ layout, we'd need something like:
>
> $ TEMPDIR=$(mktemp -d)
> $ git clone --no-checkout --separate-g
On Sat, Mar 08, 2014 at 08:43:26AM -0400, David Bremner wrote:
> W. Trevor King writes:
> > +sub do_clone {
> > + my $repository = shift;
> > + system ('git', 'clone', '--bare', $repository, $NMBGIT) == 0
> > +or die "'git clone' exited with nonzero v
On Sat, Mar 08, 2014 at 08:43:26AM -0400, David Bremner wrote:
W. Trevor King writes:
+sub do_clone {
+ my $repository = shift;
+ system ('git', 'clone', '--bare', $repository, $NMBGIT) == 0
+or die 'git clone' exited with nonzero value\n;
+ my $branch = git ('symbolic-ref
On Sat, Mar 08, 2014 at 08:26:33AM -0800, W. Trevor King wrote:
That's going to create ~/.nmbug/.git though, if we want to preserve
the current bare-style ~/.nmbug/ layout, we'd need something like:
$ TEMPDIR=$(mktemp -d)
$ git clone --no-checkout --separate-git-dir=~/.nmbug \
http
On Tue, Feb 18, 2014 at 08:34:52PM +0200, Tomi Ollila wrote:
-def __values__(self):
+def values(self):
Looks good to me. I'm not sure why I used __values__ in the first
place; probably just in the __ zone after __init__ and __setitem__.
Cheers,
Trevor
--
This email may be
David [1] and Tomi [2] both feel that the user's choice of LANG is not
explicit enough to have such a strong effect on nmbug-status. For
example, cron jobs usually default to LANG=C, and that is going to
give you ASCII output:
$ LANG=C python -c 'import locale;
Instead of always writing UTF-8, allow the user to configure the
output encoding using their locale. This is useful for previewing
output in the terminal, for poor souls that don't use UTF-8 locales
;).
---
devel/nmbug/nmbug-status | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff
We already had the tbody with a blank row separating threads (which is
not colored); this commit adds a bit of spacing to separate messages
within a thread. It will also add a bit of colored padding above the
first message and below the final message, but the main goal is to add
padding *between*
.mail.notmuch.general/17225
[4]: id:"87ha8127g8.fsf at zancas.localnet"
http://article.gmane.org/gmane.mail.notmuch.general/17239
W. Trevor King (4):
nmbug-status: Color threads in HTML output
nmbug-status: Add inter-message padding
nmbug-status: Encode output using the user
David [1] and Tomi [2] both feel that the user's choice of LANG is not
explicit enough to have such a strong effect on nmbug-status. For
example, cron jobs usually default to LANG=C, and that is going to
give you ASCII output:
$ LANG=C python -c 'import locale;
.fsf@zancas.localnet
http://article.gmane.org/gmane.mail.notmuch.general/17239
W. Trevor King (4):
nmbug-status: Color threads in HTML output
nmbug-status: Add inter-message padding
nmbug-status: Encode output using the user's locale
nmbug-status: Hardcode UTF-8 instead of using
Add tbody sections so we don't have to color every row. Multiple
tbody sections are allowed [1]. Use CSS 3's nth-child to handle
even/odd coloring (skipping the spacer rows) [2], which is supported
on the major browsers [3].
border-spacing is from CCS 2.1 [4,5]. I'm using it to avoid
Instead of always writing UTF-8, allow the user to configure the
output encoding using their locale. This is useful for previewing
output in the terminal, for poor souls that don't use UTF-8 locales
;).
---
devel/nmbug/nmbug-status | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff
We already had the tbody with a blank row separating threads (which is
not colored); this commit adds a bit of spacing to separate messages
within a thread. It will also add a bit of colored padding above the
first message and below the final message, but the main goal is to add
padding *between*
On Thu, Feb 13, 2014 at 10:13:42PM -0400, David Bremner wrote:
> I tested patches 1-6, but my fix for patch 4 broke patch 7.
>
> So maybe it's best if you regenerate the series. The concept of the last
> two patches seems OK.
Sure. Sorry I botched v3 :/. Do you want to nibble off patches one
On Thu, Feb 13, 2014 at 09:58:43PM -0400, David Bremner wrote:
> W. Trevor King writes:
> > +
> > + > />
>
> looks like a bad rebase there.
Oops. Fixed in my branch and queued for v4.
Thanks,
Trevor
--
This email may be signed or encrypted with GnuPG (http
On Thu, Feb 13, 2014 at 08:47:22AM -0800, W. Trevor King wrote:
> '''.format(date=datetime.datetime.utcnow().date(),
> + encoding=_ENCODING),
> inter_message_padding='0.25em',
> border_radius='0.5em'),
Oops, that should be:
encodi
David [1] and Tomi [2] both feel that the user's choice of LANG is not
explicit enough to have such a strong effect on nmbug-status. For
example, cron jobs usually default to LANG=C, and that is going to
give you ASCII output:
$ LANG=C python -c 'import locale;
Instead of always writing UTF-8, allow the user to configure the
output encoding using their locale. This is useful for previewing
output in the terminal, for poor souls that don't use UTF-8 locales
;).
---
devel/nmbug/nmbug-status | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
We already had the tbody with a blank row separating threads (which is
not colored); this commit adds a bit of spacing to separate messages
within a thread. It will also add a bit of colored padding above the
first message and below the final message, but the main goal is to add
padding *between*
'message-id' and 'from' now have sensitive characters escaped using
xml.sax.saxutils.escape [1]. The 'subject' data was already being
converted to a link into Gmane; I've escape()d that too, so it doesn't
need to be handled ain the same block as 'message-id' and 'from'.
This prevents broken HTML
Add tbody sections so we don't have to color every row. Multiple
tbody sections are allowed [1]. Use CSS 3's nth-child to handle
even/odd coloring (skipping the spacer rows) [2], which is supported
on the major browsers [3].
border-spacing is from CCS 2.1 [4,5]. I'm using it to avoid
* Wrap free text in tags.
* Convert to for query strings.
* Wrap message-id-term (id:"...") in .
The tags get nicer default markup (smaller monospace font) for
notmuch query terms [1]. The tags don't have much effect without
attached CSS, but bare text (phrasing content [2]) in (which
Also allow manual id overrides from the JSON config. Sluggin avoids
errors like:
Bad value '#Possible bugs' for attribute href on element a:
Whitespace in fragment component. Use %20 in place of spaces.
from http://validator.w3.org.
I tried just quoting the titles (e.g.
HTML 5 allows id attributes on all HTML elements [1], but restricts
names to particular cases [2]. Attaching the id attribute to the h3
element allows us to drop the anchor a element altogether.
[1]: http://www.w3.org/TR/html5/dom.html#the-id-attribute
[2]:
.guru-group.fi"
http://article.gmane.org/gmane.mail.notmuch.general/17209
W. Trevor King (8):
nmbug-status: Anchor with h3 ids instead of a names
nmbug-status: Slug the title when using it as an id
nmbug-status: Use and markup where appropriate
nmbug-status: Color threads in HTML output
nmbug-statu
@zancas.localnet
http://thread.gmane.org/gmane.mail.notmuch.general/17167/focus=17200
[4]: id:m2sirpu46i@guru.guru-group.fi
http://article.gmane.org/gmane.mail.notmuch.general/17191
[5]: id:m2vbwj79lu@guru.guru-group.fi
http://article.gmane.org/gmane.mail.notmuch.general/17209
W. Trevor
HTML 5 allows id attributes on all HTML elements [1], but restricts
names to particular cases [2]. Attaching the id attribute to the h3
element allows us to drop the anchor a element altogether.
[1]: http://www.w3.org/TR/html5/dom.html#the-id-attribute
[2]:
David [1] and Tomi [2] both feel that the user's choice of LANG is not
explicit enough to have such a strong effect on nmbug-status. For
example, cron jobs usually default to LANG=C, and that is going to
give you ASCII output:
$ LANG=C python -c 'import locale;
Also allow manual id overrides from the JSON config. Sluggin avoids
errors like:
Bad value '#Possible bugs' for attribute href on element a:
Whitespace in fragment component. Use %20 in place of spaces.
from http://validator.w3.org.
I tried just quoting the titles (e.g.
* Wrap free text in p tags.
* Convert blockquote to pcode for query strings.
* Wrap message-id-term (id:...) in code.
The code tags get nicer default markup (smaller monospace font) for
notmuch query terms [1]. The p tags don't have much effect without
attached CSS, but bare text (phrasing
Add tbody sections so we don't have to color every row. Multiple
tbody sections are allowed [1]. Use CSS 3's nth-child to handle
even/odd coloring (skipping the spacer rows) [2], which is supported
on the major browsers [3].
border-spacing is from CCS 2.1 [4,5]. I'm using it to avoid
'message-id' and 'from' now have sensitive characters escaped using
xml.sax.saxutils.escape [1]. The 'subject' data was already being
converted to a link into Gmane; I've escape()d that too, so it doesn't
need to be handled ain the same block as 'message-id' and 'from'.
This prevents broken HTML
We already had the tbody with a blank row separating threads (which is
not colored); this commit adds a bit of spacing to separate messages
within a thread. It will also add a bit of colored padding above the
first message and below the final message, but the main goal is to add
padding *between*
Instead of always writing UTF-8, allow the user to configure the
output encoding using their locale. This is useful for previewing
output in the terminal, for poor souls that don't use UTF-8 locales
;).
---
devel/nmbug/nmbug-status | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
On Thu, Feb 13, 2014 at 08:47:22AM -0800, W. Trevor King wrote:
'''.format(date=datetime.datetime.utcnow().date(),
+ encoding=_ENCODING),
inter_message_padding='0.25em',
border_radius='0.5em'),
Oops, that should be:
encoding=_ENCODING,
not:
encoding
On Thu, Feb 13, 2014 at 09:58:43PM -0400, David Bremner wrote:
W. Trevor King writes:
+ meta http-equiv=Content-Type content=text/html; charset=utf-8 /
+ meta http-equiv=Content-Type content=text/html; charset={encoding}
/
looks like a bad rebase there.
Oops. Fixed in my branch
On Thu, Feb 13, 2014 at 10:13:42PM -0400, David Bremner wrote:
I tested patches 1-6, but my fix for patch 4 broke patch 7.
So maybe it's best if you regenerate the series. The concept of the last
two patches seems OK.
Sure. Sorry I botched v3 :/. Do you want to nibble off patches one
On Wed, Feb 12, 2014 at 10:13:50PM -0400, David Bremner wrote:
> W. Trevor King writes:
> > I don't understand why your choice of LANG should depend on the
> > interactive-ness of an invocation.
>
> It's not the choice of LANG, but rather the acceptability of
> cr
On Wed, Feb 12, 2014 at 07:35:19PM -0400, David Bremner wrote:
> W. Trevor King writes:
> > HTML 5 for the win :). I also de-namespaced the language; the HTML 5
> > spec allows a vestigial xml:lang attribute, but it's a no-op [1], so I
> > stripped it.
>
> I
On Wed, Feb 12, 2014 at 07:35:19PM -0400, David Bremner wrote:
W. Trevor King writes:
HTML 5 for the win :). I also de-namespaced the language; the HTML 5
spec allows a vestigial xml:lang attribute, but it's a no-op [1], so I
stripped it.
I pushed the first 13 patches in the series
On Wed, Feb 12, 2014 at 10:13:50PM -0400, David Bremner wrote:
W. Trevor King writes:
I don't understand why your choice of LANG should depend on the
interactive-ness of an invocation.
It's not the choice of LANG, but rather the acceptability of
crashing with an unhandled exception.
I'd
On Tue, Feb 11, 2014 at 06:02:09PM -0400, David Bremner wrote:
> W. Trevor King writes:
> > If a user has set LANG=C, I expect that's what we should use for
> > output (in which case dying with an encoding error is the right
> > thing to do).
>
> Perhaps for an intera
On Tue, Feb 11, 2014 at 04:14:45PM +0200, Tomi Ollila wrote:
> On Tue, Feb 11 2014, David Bremner wrote:
> > W. Trevor King writes:
> >> Instead of always writing UTF-8, allow the user to configure the
> >> output encoding using their locale. This is useful
On Tue, Feb 11, 2014 at 04:14:45PM +0200, Tomi Ollila wrote:
On Tue, Feb 11 2014, David Bremner wrote:
W. Trevor King writes:
Instead of always writing UTF-8, allow the user to configure the
output encoding using their locale. This is useful for
previewing output in the terminal
On Tue, Feb 11, 2014 at 06:02:09PM -0400, David Bremner wrote:
W. Trevor King writes:
If a user has set LANG=C, I expect that's what we should use for
output (in which case dying with an encoding error is the right
thing to do).
Perhaps for an interactive tool, intended mainly to be run
We already had the tbody with a blank row separating threads (which is
not colored); this commit adds a bit of spacing to separate messages
within a thread. It will also add a bit of colored padding above the
first message and below the final message, but the main goal is to add
padding *between*
'message-id' and 'from' now have sensitive characters escaped using
xml.sax.saxutils.escape [1]. The 'subject' data was already being
converted to a link into Gmane; I've escape()d that too, so it doesn't
need to be handled ain the same block as 'message-id' and 'from'.
This prevents broken HTML
Add tbody sections so we don't have to color every row. Multiple
tbody sections are allowed [1]. Use CSS 3's nth-child to handle
even/odd coloring (skipping the spacer rows) [2], which is supported
on the major browsers [3].
border-spacing is from CCS 2.1 [4,5]. I'm using it to avoid
* Wrap free text in tags.
* Convert to for query strings.
* Wrap message-id-term (id:"...") in .
The tags get nicer default markup (smaller monospace font) for
notmuch query terms [1]. The tags don't have much effect without
attached CSS, but bare text (phrasing content [2]) in (which
Also allow manual id overrides from the JSON config. Sluggin avoids
errors like:
Bad value '#Possible bugs' for attribute href on element a:
Whitespace in fragment component. Use %20 in place of spaces.
from http://validator.w3.org.
I tried just quoting the titles (e.g.
HTML 5 allows id attributes on all HTML elements [1], but restricts
names to particular cases [2]. Attaching the id attribute to the h3
element allows us to drop the anchor a element altogether.
[1]: http://www.w3.org/TR/html5/dom.html#the-id-attribute
[2]:
Instead of always writing UTF-8, allow the user to configure the
output encoding using their locale. This is useful for previewing
output in the terminal, for poor souls that don't use UTF-8 locales
;).
---
devel/nmbug/nmbug-status | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
HTML 5 for the win :). I also de-namespaced the language; the HTML 5
spec allows a vestigial xml:lang attribute, but it's a no-op [1], so I
stripped it.
This shouldn't break anything at tethera, which already serves the
status as text/html:
$ wget -S http://nmbug.tethera.net/status/
I don't think I've ever seen '{value}\n' before :p. The new
formatting avoids mixing tag levels and content across lines.
---
devel/nmbug/nmbug-status | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index
Tomi Ollila and David Bremner (and presumably others) are running
Python 2.6 on their nmbug-status boxes, so it makes sense to keep
support for that version. This commit adds a really minimal
OrderedDict stub (e.g. it doesn't handle key removal), but it gets the
job done for Page._get_threads.
I was having trouble understanding the logic of the longish print_view
function, so I refactored the output generation into modular bits.
The basic text rendering is handled by Page, which has enough hooks
that HtmlPage can borrow the logic and slot-in HTML generators.
By modularizing the logic
Python 2's urllib.quote [1] has moved to urllib.parse.quote in Python
3 [2].
[1]: http://docs.python.org/2/library/urllib.html#urllib.quote
[2]: http://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote
---
devel/nmbug/nmbug-status | 9 ++---
1 file changed, 6 insertions(+), 3
Make this all one big string, using '...{date}...'.format(date=...) to
inject the date [1]. This syntax was added in Python 2.6, and is
preferred to %-formatting in Python 3 [1].
[1]: http://docs.python.org/2/library/stdtypes.html#str.format
---
devel/nmbug/nmbug-status | 13 ++---
1
The database in only used for notmuch.Query, so there's no need for
write access. This allows nmbug-status to run while the database is
being updated, without raising:
A Xapian exception occurred opening database: Unable to get write lock on ?:
already locked
Traceback (most recent call
The definitions of Thread, output_with_separator, and print_view were
between the main argparse and view-printing code. Group them together
with our existing read_config at the top of the module, which makes
for easier reading in the main section.
I also:
* Made 'headers' a print_view argument
By isolating this peripheral handling, we make the core logic of
nmbug-status easier to read.
---
devel/nmbug/nmbug-status | 45 +
1 file changed, 25 insertions(+), 20 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index
Avoid:
$ ./nmbug-status --list-views
Traceback (most recent call last):
File "./nmbug-status", line 47, in
'cat-file', 'blob', sha1+':status-config.json'],
TypeError: can't concat bytes to str
by explicitly converting the byte-stream read from Popen into a
Unicode string. On
rfc822 has been deprecated since Python 2.3, and it's gone in
Python 3 [1].
[1]: http://docs.python.org/2/library/rfc822.html
---
devel/nmbug/nmbug-status | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index
We shouldn't require folks to install Python 2 to run nmbug-status.
---
devel/nmbug/nmbug-status | 44 +++-
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index 934c895..b1feee9 100755
---
8190923.GE14197 at odin.tremily.us"
http://article.gmane.org/gmane.mail.notmuch.general/17151
[5]: id="20140208221925.GD17142 at odin.tremily.us"
http://article.gmane.org/gmane.mail.notmuch.general/17153
[6]: id="20140208231804.GE17142 at odin.tremily.us"
http://
The definitions of Thread, output_with_separator, and print_view were
between the main argparse and view-printing code. Group them together
with our existing read_config at the top of the module, which makes
for easier reading in the main section.
I also:
* Made 'headers' a print_view argument
/gmane.mail.notmuch.general/17151
[5]: id=20140208221925.gd17...@odin.tremily.us
http://article.gmane.org/gmane.mail.notmuch.general/17153
[6]: id=20140208231804.ge17...@odin.tremily.us
http://article.gmane.org/gmane.mail.notmuch.general/17155
W. Trevor King (20):
nmbug-status: Convert
The database in only used for notmuch.Query, so there's no need for
write access. This allows nmbug-status to run while the database is
being updated, without raising:
A Xapian exception occurred opening database: Unable to get write lock on …:
already locked
Traceback (most recent call
Tomi Ollila and David Bremner (and presumably others) are running
Python 2.6 on their nmbug-status boxes, so it makes sense to keep
support for that version. This commit adds a really minimal
OrderedDict stub (e.g. it doesn't handle key removal), but it gets the
job done for Page._get_threads.
We shouldn't require folks to install Python 2 to run nmbug-status.
---
devel/nmbug/nmbug-status | 44 +++-
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index 934c895..b1feee9 100755
---
HTML 5 allows id attributes on all HTML elements [1], but restricts
names to particular cases [2]. Attaching the id attribute to the h3
element allows us to drop the anchor a element altogether.
[1]: http://www.w3.org/TR/html5/dom.html#the-id-attribute
[2]:
By isolating this peripheral handling, we make the core logic of
nmbug-status easier to read.
---
devel/nmbug/nmbug-status | 45 +
1 file changed, 25 insertions(+), 20 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index
I don't think I've ever seen '/tdtd{value}\n' before :p. The new
formatting avoids mixing tag levels and content across lines.
---
devel/nmbug/nmbug-status | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index
Instead of always writing UTF-8, allow the user to configure the
output encoding using their locale. This is useful for previewing
output in the terminal, for poor souls that don't use UTF-8 locales
;).
---
devel/nmbug/nmbug-status | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
rfc822 has been deprecated since Python 2.3, and it's gone in
Python 3 [1].
[1]: http://docs.python.org/2/library/rfc822.html
---
devel/nmbug/nmbug-status | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index
Now the suggested usage (listed by 'nmbug-status --help') is:
usage: nmbug-status [-h] [--text] [--config PATH] [--list-views]
[--get-query VIEW]
instead of the less obvious:
usage: nmbug-status [-h] [--text] [--config CONFIG] [--list-views]
Python 2's urllib.quote [1] has moved to urllib.parse.quote in Python
3 [2].
[1]: http://docs.python.org/2/library/urllib.html#urllib.quote
[2]: http://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote
---
devel/nmbug/nmbug-status | 9 ++---
1 file changed, 6 insertions(+), 3
Add tbody sections so we don't have to color every row. Multiple
tbody sections are allowed [1]. Use CSS 3's nth-child to handle
even/odd coloring (skipping the spacer rows) [2], which is supported
on the major browsers [3].
border-spacing is from CCS 2.1 [4,5]. I'm using it to avoid
HTML 5 for the win :). I also de-namespaced the language; the HTML 5
spec allows a vestigial xml:lang attribute, but it's a no-op [1], so I
stripped it.
This shouldn't break anything at tethera, which already serves the
status as text/html:
$ wget -S http://nmbug.tethera.net/status/
301 - 400 of 489 matches
Mail list logo