Skip to content

Commit

Permalink
docs generated
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Bakera committed Dec 23, 2023
1 parent 78fd24d commit 7e710bd
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 32 deletions.
19 changes: 3 additions & 16 deletions docs/_modules/web.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,14 @@ <h1>Source code for web</h1><div class="highlight"><pre>

<span class="sd"> $ curl HOSTNAME/px/2/3/on</span>

<span class="sd">Route /page can be read with method GET or changed with methode POST.</span>
<span class="sd">Route /page can be read with method GET or changed with method POST.</span>

<span class="sd">/page (GET) returns a list of 1s and 0s the represent the current display.</span>
<span class="sd">/page (GET) returns a list of 1s and 0s that represent the current display.</span>

<span class="sd">/page (POST) expects a parameter data of 1s and 0s to change the current </span>
<span class="sd">display. Entries with x are ignored and allow for partial updates of the</span>
<span class="sd">display.</span>

<span class="sd">/txt (POST) expects a text to display.</span>

<span class="sd">/display (GET) returns the current display as JSON.</span>

<span class="sd">/display (POST) expects a JSON with a single image or a list of images to </span>
Expand Down Expand Up @@ -175,8 +173,7 @@ <h1>Source code for web</h1><div class="highlight"><pre>
<span class="n">dimension</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">display</span><span class="o">.</span><span class="n">width</span><span class="p">)</span> <span class="o">+</span> <span class="s1">&#39; x &#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">display</span><span class="o">.</span><span class="n">height</span><span class="p">)</span>
<span class="k">return</span> <span class="n">render_template</span><span class="p">(</span>
<span class="s1">&#39;index.html&#39;</span><span class="p">,</span>
<span class="n">dimension</span><span class="o">=</span><span class="n">dimension</span><span class="p">,</span>
<span class="n">web_conference_url</span><span class="o">=</span><span class="n">configuration</span><span class="o">.</span><span class="n">web_conference_url</span><span class="p">)</span></div>
<span class="n">dimension</span><span class="o">=</span><span class="n">dimension</span><span class="p">)</span></div>


<div class="viewcode-block" id="route_px">
Expand All @@ -201,16 +198,6 @@ <h1>Source code for web</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="s1">&#39;ok&#39;</span><span class="p">,</span> <span class="mi">200</span></div>


<div class="viewcode-block" id="route_txt_post">
<a class="viewcode-back" href="../web.html#web.route_txt_post">[docs]</a>
<span class="nd">@app</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s1">&#39;/txt&#39;</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;POST&#39;</span><span class="p">])</span>
<span class="k">def</span> <span class="nf">route_txt_post</span><span class="p">():</span>
<span class="s2">&quot;Expect POST request with text to display&quot;</span>
<span class="n">txt</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">get_data</span><span class="p">(</span><span class="n">as_text</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">_display_text</span><span class="p">(</span><span class="n">txt</span><span class="p">)</span>
<span class="k">return</span> <span class="sa">f</span><span class="s1">&#39;ok&#39;</span><span class="p">,</span> <span class="mi">200</span></div>


<span class="k">def</span> <span class="nf">_display_text</span><span class="p">(</span><span class="n">txt</span><span class="p">,</span> <span class="n">scrolling</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">fps</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">duration_ms</span><span class="o">=</span><span class="mi">1000</span><span class="p">):</span>
<span class="s2">&quot;Display text on display.&quot;</span>
<span class="n">display</span> <span class="o">=</span> <span class="n">get_display</span><span class="p">()</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/developer.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ must be installed.

.. code-block:: bash
$ pip install -r docgen/requirements.txt
$ pip install sphinx sphinx-rtd-theme
The documentation is created with sphinx and is configured in folder ``docgen``.
You can use ``make html`` or ``make.bat html`` to create the docucmentation
Expand Down
3 changes: 2 additions & 1 deletion docs/developer.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<li class="toctree-l1"><a class="reference internal" href="fdd.html">FlipDotDisplay</a></li>
<li class="toctree-l1"><a class="reference internal" href="simulator.html">FlipDot-Simulator</a></li>
<li class="toctree-l1"><a class="reference internal" href="net.html">Net</a></li>
<li class="toctree-l1"><a class="reference internal" href="web.html">Web</a></li>
<li class="toctree-l1"><a class="reference internal" href="game.html">Games</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Developer Documentation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#deployment">Deployment</a></li>
Expand Down Expand Up @@ -117,7 +118,7 @@ <h2>Creating the documentation<a class="headerlink" href="#creating-the-document
Therefore the sphinx framework and a third party
<a class="reference external" href="https://sphinx-rtd-theme.readthedocs.io">theme from readthedocs</a>
must be installed.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-r<span class="w"> </span>docgen/requirements.txt
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>sphinx<span class="w"> </span>sphinx-rtd-theme
</pre></div>
</div>
<p>The documentation is created with sphinx and is configured in folder <code class="docutils literal notranslate"><span class="pre">docgen</span></code>.
Expand Down
2 changes: 0 additions & 2 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,6 @@ <h2 id="R">R</h2>
<li><a href="web.html#web.route_page_post">route_page_post() (in module web)</a>
</li>
<li><a href="web.html#web.route_px">route_px() (in module web)</a>
</li>
<li><a href="web.html#web.route_txt_post">route_txt_post() (in module web)</a>
</li>
<li><a href="game.html#rogueflip.Game.run">run() (rogueflip.Game method)</a>
</li>
Expand Down
1 change: 0 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ <h1>flipflapflop - FlipDot-Anzeigen ansteuern<a class="headerlink" href="#flipfl
<li class="toctree-l2"><a class="reference internal" href="web.html#web.route_page_get"><code class="docutils literal notranslate"><span class="pre">route_page_get()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="web.html#web.route_page_post"><code class="docutils literal notranslate"><span class="pre">route_page_post()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="web.html#web.route_px"><code class="docutils literal notranslate"><span class="pre">route_px()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="web.html#web.route_txt_post"><code class="docutils literal notranslate"><span class="pre">route_txt_post()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="web.html#web.set_px"><code class="docutils literal notranslate"><span class="pre">set_px()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="web.html#web.test_display_get"><code class="docutils literal notranslate"><span class="pre">test_display_get()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="web.html#web.test_display_post"><code class="docutils literal notranslate"><span class="pre">test_display_post()</span></code></a></li>
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions docs/web.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<li class="toctree-l2"><a class="reference internal" href="#web.route_page_get"><code class="docutils literal notranslate"><span class="pre">route_page_get()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#web.route_page_post"><code class="docutils literal notranslate"><span class="pre">route_page_post()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#web.route_px"><code class="docutils literal notranslate"><span class="pre">route_px()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#web.route_txt_post"><code class="docutils literal notranslate"><span class="pre">route_txt_post()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#web.set_px"><code class="docutils literal notranslate"><span class="pre">set_px()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#web.test_display_get"><code class="docutils literal notranslate"><span class="pre">test_display_get()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="#web.test_display_post"><code class="docutils literal notranslate"><span class="pre">test_display_post()</span></code></a></li>
Expand Down Expand Up @@ -111,12 +110,11 @@
<blockquote>
<div><p>$ curl HOSTNAME/px/2/3/on</p>
</div></blockquote>
<p>Route /page can be read with method GET or changed with methode POST.</p>
<p>/page (GET) returns a list of 1s and 0s the represent the current display.</p>
<p>Route /page can be read with method GET or changed with method POST.</p>
<p>/page (GET) returns a list of 1s and 0s that represent the current display.</p>
<p>/page (POST) expects a parameter data of 1s and 0s to change the current
display. Entries with x are ignored and allow for partial updates of the
display.</p>
<p>/txt (POST) expects a text to display.</p>
<p>/display (GET) returns the current display as JSON.</p>
<p>/display (POST) expects a JSON with a single image or a list of images to
display. Each image is a dictionary with the keys “pixels” and “duration_ms”.
Expand Down Expand Up @@ -212,12 +210,6 @@
<span class="sig-prename descclassname"><span class="pre">web.</span></span><span class="sig-name descname"><span class="pre">route_px</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">onoff</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/web.html#route_px"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#web.route_px" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="web.route_txt_post">
<span class="sig-prename descclassname"><span class="pre">web.</span></span><span class="sig-name descname"><span class="pre">route_txt_post</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/web.html#route_txt_post"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#web.route_txt_post" title="Link to this definition"></a></dt>
<dd><p>Expect POST request with text to display</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="web.set_px">
<span class="sig-prename descclassname"><span class="pre">web.</span></span><span class="sig-name descname"><span class="pre">set_px</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">val</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/web.html#set_px"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#web.set_px" title="Link to this definition"></a></dt>
Expand Down

0 comments on commit 7e710bd

Please sign in to comment.