Ticket #4566: lore-conch-cleanups.diff

File lore-conch-cleanups.diff, 5.4 KB (added by Screwtape, 4 years ago)

A patch that cleans up the Sphinx rendering of the Conch docs.

  • doc/conch/examples/index.xhtml

    diff --git a/doc/conch/examples/index.xhtml b/doc/conch/examples/index.xhtml
    index 6b1dec6..08ec66e 100644
    a b  
    1212 
    1313    <h2>Simple SSH server and client</h2> 
    1414    <ul> 
    15         <li><a href="sshsimpleclient.py">sshsimpleclient.py</a></li> 
    16         <li><a href="sshsimpleserver.py">sshsimpleserver.py</a></li> 
     15        <li><a href="sshsimpleclient.py">sshsimpleclient.py</a> - simple SSH client</li> 
     16        <li><a href="sshsimpleserver.py">sshsimpleserver.py</a> - simple SSH server</li> 
    1717    </ul> 
    1818 
    1919    <h2>Simple telnet server</h2> 
    2020    <ul> 
    21         <li><a href="telnet_echo.tac">A telnet server which echoes data and events back to the client</a></li> 
     21        <li><a href="telnet_echo.tac">telnet_echo.tac</a> - A telnet server which echoes data and events back to the client</li> 
    2222    </ul> 
    2323 
    2424 
    2525    <h2>twisted.conch.insults examples</h2> 
    2626    <ul> 
    27       <li><a href="demo.tac">demo.tac</a> Nearly pointless demonstration of the manhole interactive interpreter</li> 
    28       <li><a href="demo_draw.tac">demo_draw.tac</a> A trivial drawing application</li> 
    29       <li><a href="demo_insults.tac">demo_insults.tac</a> Various simple terminal manipulations using the insults module</li> 
    30       <li><a href="demo_recvline.tac">demo_recvline.tac</a> Demonstrates line-at-a-time handling with basic line-editing support</li> 
    31       <li><a href="demo_scroll.tac">demo_scroll.tac</a> Simple echo-ish server that uses the scroll-region</li> 
    32       <li><a href="demo_manhole.tac">demo_manhole.tac</a> An interactive Python interpreter with syntax coloring</li> 
    33       <li><a href="window.tac">window.tac</a> An example of various widgets</li> 
     27      <li><a href="demo.tac">demo.tac</a> - Nearly pointless demonstration of the manhole interactive interpreter</li> 
     28      <li><a href="demo_draw.tac">demo_draw.tac</a> - A trivial drawing application</li> 
     29      <li><a href="demo_insults.tac">demo_insults.tac</a> - Various simple terminal manipulations using the insults module</li> 
     30      <li><a href="demo_recvline.tac">demo_recvline.tac</a> - Demonstrates line-at-a-time handling with basic line-editing support</li> 
     31      <li><a href="demo_scroll.tac">demo_scroll.tac</a> - Simple echo-ish server that uses the scroll-region</li> 
     32      <li><a href="demo_manhole.tac">demo_manhole.tac</a> - An interactive Python interpreter with syntax coloring</li> 
     33      <li><a href="window.tac">window.tac</a> - An example of various widgets</li> 
    3434    </ul> 
    3535</body> 
    3636</html> 
  • doc/conch/howto/conch_client.xhtml

    diff --git a/doc/conch/howto/conch_client.xhtml b/doc/conch/howto/conch_client.xhtml
    index 25d0980..80b7b0c 100644
    a b class="python">Deferreds</code> because they may need to ask the user 
    129129for input.</p> 
    130130 
    131131<p>Once the authentication is complete, <code 
    132 class="python">SSHUserAuthClient</code> takes care of starting the code 
     132class="python">SSHUserAuthClient</code> takes care of starting the code  
    133133<code class="python">SSHConnection</code> object given to it. Next, we'll 
    134134look at how to use the <code class="python">SSHConnection</code></p> 
    135135 
    server supports it.</p> 
    187187where everything gets started. It gets passed a chunk of data; 
    188188however, this chunk is usually nothing and can be ignored. 
    189189Our <code class="python">channelOpen()</code> initializes our 
    190 channel, and sends a request to the other side, using the 
     190channel, and sends a request to the other side, using the  
    191191<code class="python">sendRequest()</code> method of the <code 
    192192class="python">SSHConnection</code> object. Requests are used to send 
    193193events to the other side. We pass the method self so that it knows to 
    194194send the request for this channel. The 2nd argument of 'exec' tells the 
    195195server that we want to execute a command. The third argument is the data 
    196 that accompanies the request. <code class="API">common.NS</code> encodes 
     196that accompanies the request.  
     197<code class="API" base="twisted.conch.ssh">common.NS</code> encodes 
    197198the data as a length-prefixed string, which is how the server expects 
    198199the data. We also say that we want a reply saying that the process has a 
    199 been started. <code class="python">sendRequest()</code> then returns a 
     200been started. <code class="python">sendRequest()</code> then returns a  
    200201<code class="python">Deferred</code> which we add a callback for.</p> 
    201202 
    202203<p>Once the callback fires, we send the data. <code 
    203 class="python">SSHChannel</code> supports the <code class="API"> 
    204 twisted.internet.interface.Transport</code> interface, so 
     204class="python">SSHChannel</code> supports the  
     205<code class="API">twisted.internet.interfaces.ITransport</code>  
     206interface, so 
    205207it can be given to Protocols to run them over the secure 
    206208connection. In our case, we just write the data directly. <code 
    207209class="python">sendEOF()</code> does not follow the interface, 
    of <code class="API">twisted.internet.protocol.ClientFactory</code>. 
    235237This instance has the attribute <code class="python">protocol</code> 
    236238set to our earlier <code class="python">ClientTransport</code> 
    237239class. Note that the protocol attribute is set to the class <code 
    238 class="python">ClientTransport</code>, not an instance of 
     240class="python">ClientTransport</code>, not an instance of  
    239241<code class="python">ClientTransport</code>! When the <code 
    240242class="python">connectTCP</code> call completes, the protocol will be 
    241243called to create a <code class="python">ClientTransport()</code> object