Skip to content
Snippets Groups Projects
Commit 180d59c6 authored by Damian Johnson's avatar Damian Johnson
Browse files

Module providing tor manual information

For years Nyx (aka arm) has done a neat trick where we describe what torrc
options do and how they're used (ie, what you get with 'man tor'). To do this
Nyx had its own cobbled together parser for tor's man page. Clearly a hack, but
it worked.

While that was all well and good, but we can clearly do better. Introducing
'stem.manual' which, besides filling Nyx's needs, provides...

  * Tor test coverage. This adds several integration tests to confirm tor can
    properly build a valid man page.

  * Provides all Stem users with three methods for getting tor manual
    information...

    a. from_cache() - Retrieves information bundled with Stem. This is only as
       up to date as Stem itself, but the fastest and most reliable method.

    b. from_man() - Parses information from the local system by running 'man
       tor'. Still fast, but obviously requires tor's man page to be present.

    c. from_remote() - Retrieves the latest manual information from tor's git
       repository. This is slow and shouldn't be used without a fallback, but
       provides the most up-to-date manual information.

    These methods can be chained together as fallbacks. For instance see...

       https://stem.torproject.org/api/manual.html

  * Along with tor's manual information we provide brief, more user-friendly
    descriptions of all tor's configuration options.

  * Parser is much improved over Nyx's. In particular the stem.manual module
    has vastly improved performance, test coverage, and updated summary
    information.
parents 4ecaa61c bd86f108
Loading
Showing
with 2638 additions and 95 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment