-
- Downloads
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.
Showing
- cache_manual.py 56 additions, 0 deletionscache_manual.py
- docs/_static/example/manual_config_options.py 30 additions, 0 deletionsdocs/_static/example/manual_config_options.py
- docs/_static/manual_output.png 0 additions, 0 deletionsdocs/_static/manual_output.png
- docs/api.rst 1 addition, 0 deletionsdocs/api.rst
- docs/api/manual.rst 5 additions, 0 deletionsdocs/api/manual.rst
- docs/change_log.rst 2 additions, 0 deletionsdocs/change_log.rst
- docs/contents.rst 1 addition, 0 deletionsdocs/contents.rst
- run_tests.py 5 additions, 1 deletionrun_tests.py
- setup.py 1 addition, 2 deletionssetup.py
- stem/cached_tor_manual.cfg 1828 additions, 0 deletionsstem/cached_tor_manual.cfg
- stem/control.py 53 additions, 56 deletionsstem/control.py
- stem/descriptor/hidden_service_descriptor.py 15 additions, 17 deletionsstem/descriptor/hidden_service_descriptor.py
- stem/descriptor/microdescriptor.py 3 additions, 0 deletionsstem/descriptor/microdescriptor.py
- stem/descriptor/networkstatus.py 23 additions, 17 deletionsstem/descriptor/networkstatus.py
- stem/descriptor/reader.py 1 addition, 0 deletionsstem/descriptor/reader.py
- stem/descriptor/remote.py 3 additions, 2 deletionsstem/descriptor/remote.py
- stem/descriptor/router_status_entry.py 12 additions, 0 deletionsstem/descriptor/router_status_entry.py
- stem/descriptor/server_descriptor.py 6 additions, 0 deletionsstem/descriptor/server_descriptor.py
- stem/exit_policy.py 9 additions, 0 deletionsstem/exit_policy.py
- stem/manual.py 584 additions, 0 deletionsstem/manual.py
Loading
Please register or sign in to comment