Skip to content
Snippets Groups Projects
Commit 01ef1d7f authored by Tim Stadtmann's avatar Tim Stadtmann
Browse files

Fix wrong hyperlinks in documentation

Sphinx generates a redundant html-file 'source.html'. Each internal href,
derived from a link to a class/method/attribute, links source.html and
not the corresponding file (e.g. EV3.html when referencing EV3.connect()).
The postprocessing script now fixes these wrong links.
parent 98065487
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -150,6 +150,16 @@
<p>This is the 'central' class (from user's view) when working with this toolbox. It
delivers a convenient interface for creating a connection to the brick and sending
commands to it. An EV3-object creates 4 Motor- and 4 Sensor-objects, one for each port.</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference internal" href="#source.EV3.setProperties" title="source.EV3.setProperties"><code class="xref mat mat-meth docutils literal"><span class="pre">setProperties()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.beep" title="source.EV3.beep"><code class="xref mat mat-meth docutils literal"><span class="pre">beep()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.stopAllMotors" title="source.EV3.stopAllMotors"><code class="xref mat mat-meth docutils literal"><span class="pre">stopAllMotors()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.playTone" title="source.EV3.playTone"><code class="xref mat mat-meth docutils literal"><span class="pre">playTone()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.stopTone" title="source.EV3.stopTone"><code class="xref mat mat-meth docutils literal"><span class="pre">stopTone()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.tonePlayed" title="source.EV3.tonePlayed"><code class="xref mat mat-meth docutils literal"><span class="pre">tonePlayed()</span></code></a></li>
</ul>
</div></blockquote>
<p class="rubric">Notes</p>
<ul class="simple">
<li>Creating multiple EV3 objects and connecting them to different physical bricks has not
......@@ -221,13 +231,13 @@ follows: <em>brickObject.motorA.setProperties('power', 50);</em></li>
<dl class="attribute">
<dt id="source.EV3.batteryMode">
<code class="descname">batteryMode</code><a class="headerlink" href="#source.EV3.batteryMode" title="Permalink to this definition"></a></dt>
<dd><p><em>string in {'Percentage', 'Voltage'}</em> &#8211; Mode for reading battery charge. See also <a class="reference internal" href="source.html#source.EV3.batteryValue" title="source.EV3.batteryValue"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryValue</span></code></a>. <em>[WRITABLE]</em></p>
<dd><p><em>string in {'Percentage', 'Voltage'}</em> &#8211; Mode for reading battery charge. See also <a class="reference internal" href="#source.EV3.batteryValue" title="source.EV3.batteryValue"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryValue</span></code></a>. <em>[WRITABLE]</em></p>
</dd></dl>
<dl class="attribute">
<dt id="source.EV3.batteryValue">
<code class="descname">batteryValue</code><a class="headerlink" href="#source.EV3.batteryValue" title="Permalink to this definition"></a></dt>
<dd><p><em>numeric</em> &#8211; Current battery charge. Depending on batteryMode, the reading is either in percentage or voltage. See also <a class="reference internal" href="source.html#source.EV3.batteryMode" title="source.EV3.batteryMode"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryMode</span></code></a>. <em>[READ-ONLY]</em></p>
<dd><p><em>numeric</em> &#8211; Current battery charge. Depending on batteryMode, the reading is either in percentage or voltage. See also <a class="reference internal" href="#source.EV3.batteryMode" title="source.EV3.batteryMode"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryMode</span></code></a>. <em>[READ-ONLY]</em></p>
</dd></dl>
<dl class="attribute">
......@@ -287,7 +297,7 @@ b.connect('bt', 'serPort', '/dev/rfcomm0'); % <br />
% Setup usb connection, beep when connection has been established
b = EV3(); % <br />
b.connect('usb', 'beep', 'on', ); % <br /></p>
<p>See also ISCONNECTED / <a class="reference internal" href="source.html#source.EV3.isConnected" title="source.EV3.isConnected"><code class="xref mat mat-attr docutils literal"><span class="pre">isConnected</span></code></a></p>
<p>See also ISCONNECTED / <a class="reference internal" href="#source.EV3.isConnected" title="source.EV3.isConnected"><code class="xref mat mat-attr docutils literal"><span class="pre">isConnected</span></code></a></p>
</dd></dl>
<dl class="method">
......@@ -350,7 +360,7 @@ second. <br /></p>
b.connect('bt', 'serPort', '/dev/rfcomm0'); % <br />
b.setProperties('debug', 'on', 'batteryMode', 'Voltage'); % <br />
% Instead of: b.debug = 'on'; b.batteryMode = 'Voltage'; % <br /></p>
<p>See also EV3.DEBUG, EV3.BATTERYMODE / <a class="reference internal" href="source.html#source.EV3.debug" title="source.EV3.debug"><code class="xref mat mat-attr docutils literal"><span class="pre">debug</span></code></a>, <a class="reference internal" href="source.html#source.EV3.batteryMode" title="source.EV3.batteryMode"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryMode</span></code></a></p>
<p>See also EV3.DEBUG, EV3.BATTERYMODE / <a class="reference internal" href="#source.EV3.debug" title="source.EV3.debug"><code class="xref mat mat-attr docutils literal"><span class="pre">debug</span></code></a>, <a class="reference internal" href="#source.EV3.batteryMode" title="source.EV3.batteryMode"><code class="xref mat mat-attr docutils literal"><span class="pre">batteryMode</span></code></a></p>
</dd></dl>
<dl class="method">
......
This diff is collapsed.
......@@ -140,6 +140,16 @@
<p>This is the &#8216;central&#8217; class (from user&#8217;s view) when working with this toolbox. It
delivers a convenient interface for creating a connection to the brick and sending
commands to it. An EV3-object creates 4 Motor- and 4 Sensor-objects, one for each port.</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference internal" href="#source.EV3.setProperties" title="source.EV3.setProperties"><code class="xref mat mat-meth docutils literal"><span class="pre">setProperties()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.beep" title="source.EV3.beep"><code class="xref mat mat-meth docutils literal"><span class="pre">beep()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.stopAllMotors" title="source.EV3.stopAllMotors"><code class="xref mat mat-meth docutils literal"><span class="pre">stopAllMotors()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.playTone" title="source.EV3.playTone"><code class="xref mat mat-meth docutils literal"><span class="pre">playTone()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.stopTone" title="source.EV3.stopTone"><code class="xref mat mat-meth docutils literal"><span class="pre">stopTone()</span></code></a></li>
<li><a class="reference internal" href="#source.EV3.tonePlayed" title="source.EV3.tonePlayed"><code class="xref mat mat-meth docutils literal"><span class="pre">tonePlayed()</span></code></a></li>
</ul>
</div></blockquote>
<p class="rubric">Notes</p>
<ul class="simple">
<li>Creating multiple EV3 objects and connecting them to different physical bricks has not
......
......@@ -103,6 +103,10 @@ def postprocess_html_files():
if(ugly_module_string in line):
line = line.replace(ugly_module_string, '')
wrong_href = 'source.html'
if(wrong_href in line):
line = line.replace(wrong_href, '')
f_new.write(line)
close(fh)
remove(current_file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment