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

Drop download link from tutorials

Well, damn. Turns out Sphinx 1.3 isn't yet available in Debian backports...

  https://trac.torproject.org/projects/tor/ticket/16214

Until it is we can't use the :caption: attribute. Dropping it for now so we can
once again build our site.
parent a1278e22
No related branches found
No related tags found
No related merge requests found
Showing
with 2 additions and 29 deletions
......@@ -52,7 +52,6 @@ The following are only available within Stem's `git repository
* **Website**
* Example for `custom path selection for circuits <tutorials/to_russia_with_love.html#custom-path-selection>`_ (:trac:`8728`)
* Download link for tutorial examples (:trac:`10411`)
.. _version_1.4:
......
......@@ -22,7 +22,7 @@ sys.path.append(os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.3' # required for the caption option
needs_sphinx = '1.1' # required for the sphinx-apidoc command
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
......
......@@ -545,7 +545,7 @@ example...
How do I build the site?
------------------------
If you have `Sphinx <http://sphinx-doc.org/>`_ version 1.3 or later installed
If you have `Sphinx <http://sphinx-doc.org/>`_ version 1.1 or later installed
then building our site is as easy as...
::
......
......@@ -34,7 +34,6 @@ With that out of the way, how do you look up this information? Below is a
simple script that dumps Tor's present connections.
.. literalinclude:: /_static/example/utilities.py
:caption: `[Download] <../_static/example/utilities.py>`__
:language: python
::
......
......@@ -8,7 +8,6 @@ Compares the votes of two directory authorities, in this case moria1 and
maatuska, with a special interest in the 'Running' flag.
.. literalinclude:: /_static/example/compare_flags.py
:caption: `[Download] <../../_static/example/compare_flags.py>`__
:language: python
::
......
......@@ -12,7 +12,6 @@ Here's a simple script that prints information about the exits used to service
the requests going through Tor...
.. literalinclude:: /_static/example/exit_used.py
:caption: `[Download] <../../_static/example/exit_used.py>`__
:language: python
Now if you make a request over Tor...
......
......@@ -8,7 +8,6 @@ Tor creates new circuits and tears down old ones on your behalf, so how can you
get information about circuits Tor currently has available?
.. literalinclude:: /_static/example/list_circuits.py
:caption: `[Download] <../../_static/example/list_circuits.py>`__
:language: python
::
......
......@@ -9,7 +9,6 @@ support for old ones. Below is the script we used on :trac:`9476` to reach out
to relay operators that needed to upgrade.
.. literalinclude:: /_static/example/outdated_relays.py
:caption: `[Download] <../../_static/example/outdated_relays.py>`__
:language: python
::
......
......@@ -31,7 +31,6 @@ So how do we get it? Just tell Stem that's what you want. The
consensus. For example, to write the consensus simply do the following...
.. literalinclude:: /_static/example/persisting_a_consensus.py
:caption: `[Download] <../../_static/example/persisting_a_consensus.py>`__
:language: python
Our *consensus* here is the current
......@@ -52,5 +51,4 @@ Our *consensus* here is the current
You can then read it back with :func:`~stem.descriptor.__init__.parse_file`...
.. literalinclude:: /_static/example/persisting_a_consensus_with_parse_file.py
:caption: `[Download] <../../_static/example/persisting_a_consensus_with_parse_file.py>`__
:language: python
......@@ -17,7 +17,6 @@ Bandwidth authorities include their measurements in their votes. The following
gets their current votes then prints how many relays it had a measurement for.
.. literalinclude:: /_static/example/votes_by_bandwidth_authorities.py
:caption: `[Download] <../../_static/example/votes_by_bandwidth_authorities.py>`__
:language: python
::
......
......@@ -77,7 +77,6 @@ irresponsible script can make Tor worse for everyone.
Listing the current relays in the Tor network is as easy as...
.. literalinclude:: /_static/example/current_descriptors.py
:caption: `[Download] <../_static/example/current_descriptors.py>`__
:language: python
.. _where-can-i-get-past-descriptors:
......@@ -90,7 +89,6 @@ Descriptor archives are available from `CollecTor
the `DescriptorReader <../api/descriptor/reader.html>`_...
.. literalinclude:: /_static/example/past_descriptors.py
:caption: `[Download] <../_static/example/past_descriptors.py>`__
:language: python
.. _can-i-get-descriptors-from-the-tor-process:
......@@ -140,13 +138,11 @@ Now that Tor is happy chugging along, up-to-date descriptors are available
through Tor's control socket...
.. literalinclude:: /_static/example/descriptor_from_tor_control_socket.py
:caption: `[Download] <../_static/example/descriptor_from_tor_control_socket.py>`__
:language: python
... or by reading directly from Tor's data directory...
.. literalinclude:: /_static/example/descriptor_from_tor_data_directory.py
:caption: `[Download] <../_static/example/descriptor_from_tor_data_directory.py>`__
:language: python
.. _validating-the-descriptors-content:
......@@ -175,7 +171,6 @@ Validating is as simple as including **validate = True** in any method that
provides descriptors...
.. literalinclude:: /_static/example/validate_descriptor_content.py
:caption: `[Download] <../_static/example/validate_descriptor_content.py>`__
:language: python
.. _saving-and-loading-descriptors:
......@@ -188,7 +183,6 @@ Tor descriptors are just plaintext documents. As such, if you'd rather not use
descriptor by simply writing it to disk, then reading it back later.
.. literalinclude:: /_static/example/saving_and_loading_descriptors.py
:caption: `[Download] <../_static/example/saving_and_loading_descriptors.py>`__
:language: python
Our *server_descriptors* here is a list of
......@@ -211,7 +205,6 @@ We can then read it back with :func:`~stem.descriptor.__init__.parse_file`
by telling it the type of descriptors we're reading...
.. literalinclude:: /_static/example/read_with_parse_file.py
:caption: `[Download] <../_static/example/read_with_parse_file.py>`__
:language: python
For an example of doing this with a consensus document `see here
......@@ -234,7 +227,6 @@ could use any of the methods above, but for this example we'll use
`stem.descriptor.remote <../api/descriptor/remote.html>`_...
.. literalinclude:: /_static/example/tor_descriptors.py
:caption: `[Download] <../_static/example/tor_descriptors.py>`__
:language: python
::
......
......@@ -52,7 +52,6 @@ But with that out of the way lets take a look at a simple `Flask
<https://jordan-wright.github.io/blog/2014/10/06/creating-tor-hidden-services-with-python/>`_...
.. literalinclude:: /_static/example/running_hidden_service.py
:caption: `[Download] <../_static/example/running_hidden_service.py>`__
:language: python
Now if we run this...
......@@ -106,7 +105,6 @@ Stem provides three methods to work with ephemeral hidden services...
For example, with a ephemeral service our earlier example becomes as simple as...
.. literalinclude:: /_static/example/ephemeral_hidden_services.py
:caption: `[Download] <../_static/example/ephemeral_hidden_services.py>`__
:language: python
.. _hidden-service-descriptors:
......@@ -120,7 +118,6 @@ connections. Hidden service descriptors are available from the tor process via
its :func:`~stem.control.Controller.get_hidden_service_descriptor` method...
.. literalinclude:: /_static/example/get_hidden_service_descriptor.py
:caption: `[Download] <../_static/example/get_hidden_service_descriptor.py>`__
:language: python
::
......@@ -151,7 +148,6 @@ descriptor's
method.
.. literalinclude:: /_static/example/introduction_points.py
:caption: `[Download] <../_static/example/introduction_points.py>`__
:language: python
::
......
......@@ -48,7 +48,6 @@ unfamiliar with the '**with**' keyword then see `here
<../faq.html#what-is-that-with-keyword-i-keep-seeing-in-the-tutorials>`_...
.. literalinclude:: /_static/example/hello_world.py
:caption: `[Download] <../_static/example/hello_world.py>`_
:language: python
::
......
......@@ -52,7 +52,6 @@ improve this example then please `let me know
<https://www.atagar.com/contact/>`_!
.. literalinclude:: /_static/example/client_usage_using_pycurl.py
:caption: `[Download] <../_static/example/client_usage_using_pycurl.py>`__
:language: python
.. image:: /_static/locale_selection_output.png
......@@ -69,7 +68,6 @@ control port. To use this approach simply replace the query() function above
with...
.. literalinclude:: /_static/example/client_usage_using_socksipy.py
:caption: `[Download] <../_static/example/client_usage_using_socksipy.py>`__
:language: python
.. _reading-twitter:
......@@ -84,7 +82,6 @@ authentication `see their instructions
<https://dev.twitter.com/oauth/overview/application-owner-access-tokens>`_...
.. literalinclude:: /_static/example/reading_twitter.py
:caption: `[Download] <../_static/example/reading_twitter.py>`__
:language: python
.. image:: /_static/twitter_output.png
......@@ -115,7 +112,6 @@ reachability and speed. **Naturally doing this causes quite a bit of load so
please be careful not to leave this running!**
.. literalinclude:: /_static/example/custom_path_selection.py
:caption: `[Download] <../_static/example/custom_path_selection.py>`__
:language: python
::
......
......@@ -29,7 +29,6 @@ are events that Tor emits each second saying the number of bytes downloaded and
uploaded.
.. literalinclude:: /_static/example/event_listening.py
:caption: `[Download] <../_static/example/event_listening.py>`__
:emphasize-lines: 53-55,62-67
:language: python
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment