[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#872868: Bug#877023: debian-policy: No section numbers in policy.txt.gz



On Wed, Sep 27, 2017 at 06:43:41PM -0700, Russ Allbery wrote:
> Olly Betts <olly@survex.com> writes:
> > /usr/share/doc/debian-policy/policy.txt.gz no longer has any section
> > numbers, which makes it useless as a way to quickly locate a policy
> > section to quote to someone as a reference.  The plain text version is
> > the easiest to search, so this is a really annoying regression.
> 
> Yeah, this is a limitation of Sphinx that hopefully will be fixed.

It seems Sphinx upstream don't view this as a priority - at least
they've not responded to the ticket at all nearly 3 months after
it was opened:

https://github.com/sphinx-doc/sphinx/issues/3998 

> In the meantime, w3m to read the HTML version does work pretty well
> and supports search (plus has an index that makes it pretty fast to
> find particular sections).  But I did the same thing you did, and
> definitely want to fix this sooner rather than later.

Perhaps for now it would be better to eschew Sphinx's text output and
actually generate policy.txt using w3m something like this:

w3m policy-1.html > policy.txt

That gives a text file with section numbers and the formatting seems
no worse overall than Sphinx's output (if anything it seems better as
you don't have to wade through the massive TOC to get to actual
content).

Cheers,
    Olly


Reply to: