Deploying to gh-pages from @ Nonannet/pyladoc@5f6147c2b9 🚀

This commit is contained in:
Nonannet 2025-06-25 06:41:29 +00:00
parent 2b5fbc4dea
commit 4555b713b9
2 changed files with 26 additions and 22 deletions

View File

@ -266,20 +266,20 @@
<h1>Pyladoc<a class="headerlink" href="#pyladoc" title="Link to this heading">#</a></h1> <h1>Pyladoc<a class="headerlink" href="#pyladoc" title="Link to this heading">#</a></h1>
<section id="description"> <section id="description">
<h2>Description<a class="headerlink" href="#description" title="Link to this heading">#</a></h2> <h2>Description<a class="headerlink" href="#description" title="Link to this heading">#</a></h2>
<p>Pyladoc is a python package for programmatically generating HTML and <p>Pyladoc is a Python package for programmatically generating HTML and
PDF/LaTeX output. This package targets specifically applications where reports PDF/LaTeX output. This package specifically targets applications where reports
or results with Pandas-tables and Matplotlib-figures are generated or results with Pandas tables and Matplotlib figures are generated
to be displayed as website and as PDF document without involving any manual to be displayed as a website and as a PDF document without involving any manual
formatting steps.</p> formatting steps.</p>
<p>This package focuses on the “Document in Code” approach for cases <p>This package focuses on the “Document in Code” approach for cases
where a lot of calculations and data handling is done but not a lot of where a lot of calculations and data handling is done but not a lot of
document text needs to be displayed. The multiline string capability of Python document text needs to be displayed. The multiline string capability of Python
handles this very well. In comparison to “Code in Document”-templates handles this very well. In comparison to “Code in Document” templates,
python tools supports this approach out of the box - similar doch docstrings.</p> Python tools support this approach out of the box—similar to docstrings.</p>
<p>As backend for PDF generation LaTeX is used. There are excellent engines for <p>LaTeX is used as the backend for PDF generation. There are excellent engines for
rendering HTML to PDF, but even if there is no requirement for an rendering HTML to PDF, but even if there is no requirement for
accurate typesetting and what not, placing programmatically content of variable accurate typesetting, placing programmatically generated content of variable
composition and element sizes on fixed size pages without manual intervention composition and element sizes on fixed-size pages without manual intervention
is a hard problem where LaTeX is superior.</p> is a hard problem where LaTeX is superior.</p>
</section> </section>
<section id="example-outputs"> <section id="example-outputs">
@ -298,7 +298,7 @@ is a hard problem where LaTeX is superior.</p>
<li><p>Tables (Pandas, Markdown or HTML)</p></li> <li><p>Tables (Pandas, Markdown or HTML)</p></li>
<li><p>Matplotlib figures</p></li> <li><p>Matplotlib figures</p></li>
<li><p>LaTeX equations (block or inline)</p></li> <li><p>LaTeX equations (block or inline)</p></li>
<li><p>Named references for figures, tables and equations</p></li> <li><p>Named references for figures, tables, and equations</p></li>
</ul> </ul>
</section> </section>
<section id="key-features"> <section id="key-features">
@ -306,7 +306,7 @@ is a hard problem where LaTeX is superior.</p>
<ul class="simple"> <ul class="simple">
<li><p>HTML and PDF/LaTeX rendering of the same document</p></li> <li><p>HTML and PDF/LaTeX rendering of the same document</p></li>
<li><p>Single file output including figures</p></li> <li><p>Single file output including figures</p></li>
<li><p>Figure and equation embedding in HTML by inline SVG, SVG in Base64 or PNG in Base64</p></li> <li><p>Figure and equation embedding in HTML by inline SVG, SVG in Base64, or PNG in Base64</p></li>
<li><p>Figure embedding in LaTeX as PGF/TikZ</p></li> <li><p>Figure embedding in LaTeX as PGF/TikZ</p></li>
<li><p>Tested on Linux and Windows</p></li> <li><p>Tested on Linux and Windows</p></li>
</ul> </ul>
@ -325,18 +325,22 @@ is a hard problem where LaTeX is superior.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>pyladoc <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>pyladoc
</pre></div> </pre></div>
</div> </div>
<p>As well as with conda:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>conda<span class="w"> </span>install<span class="w"> </span>conda-forge::pyladoc
</pre></div>
</div>
</section> </section>
<section id="dependencies"> <section id="dependencies">
<h2>Dependencies<a class="headerlink" href="#dependencies" title="Link to this heading">#</a></h2> <h2>Dependencies<a class="headerlink" href="#dependencies" title="Link to this heading">#</a></h2>
<p>Pyladoc depends on the markdown package.</p> <p>Pyladoc depends on the markdown package.</p>
<p>Optional dependencies are:</p> <p>Optional dependencies are:</p>
<ul class="simple"> <ul class="simple">
<li><p>Matplotlib python package for rendering LaTeX equations for HTML output</p></li> <li><p>Matplotlib Python package for rendering LaTeX equations for HTML output</p></li>
<li><p>LaTeX for exporting to PDF or exporting Matplotlib figures to LaTeX (PGF/TikZ rendering)</p></li> <li><p>LaTeX for exporting to PDF or exporting Matplotlib figures to LaTeX (PGF/TikZ rendering)</p></li>
<li><p>Pandas and Jinja2 for rendering pandas tables</p></li> <li><p>Pandas and Jinja2 for rendering Pandas tables</p></li>
<li><p>Matplotlib for rendering matplotlib figures (obviously)</p></li> <li><p>Matplotlib for rendering Matplotlib figures (obviously)</p></li>
</ul> </ul>
<p>For the included template the <code class="docutils literal notranslate"><span class="pre">miktex</span></code>-LaTeX distribution works on Windows <p>For the included template, the <code class="docutils literal notranslate"><span class="pre">miktex</span></code> LaTeX distribution works on Windows
and the following LaTeX setup works on Ubuntu (both tested in CI):</p> and the following LaTeX setup works on Ubuntu (both tested in CI):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>apt-get<span class="w"> </span>update <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>apt-get<span class="w"> </span>update
sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span>texlive-latex-extra<span class="w"> </span>texlive-fonts-recommended<span class="w"> </span>lmodern<span class="w"> </span>texlive-xetex<span class="w"> </span>texlive-science sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span>texlive-latex-extra<span class="w"> </span>texlive-fonts-recommended<span class="w"> </span>lmodern<span class="w"> </span>texlive-xetex<span class="w"> </span>texlive-science
@ -345,7 +349,7 @@ sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w
</section> </section>
<section id="usage"> <section id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Link to this heading">#</a></h2> <h2>Usage<a class="headerlink" href="#usage" title="Link to this heading">#</a></h2>
<p>It is easy to use as the following example code shows:</p> <p>It is easy to use, as the following example code shows:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">pyladoc</span> <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">pyladoc</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">pandas</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">pd</span> <span class="kn">import</span><span class="w"> </span><span class="nn">pandas</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">pd</span>
@ -381,7 +385,7 @@ sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w
</section> </section>
<section id="contributing"> <section id="contributing">
<h2>Contributing<a class="headerlink" href="#contributing" title="Link to this heading">#</a></h2> <h2>Contributing<a class="headerlink" href="#contributing" title="Link to this heading">#</a></h2>
<p>Contributions are welcome, please open an issue or submit a pull request on GitHub.</p> <p>Contributions are welcome; please open an issue or submit a pull request on GitHub.</p>
</section> </section>
<section id="developer-guide"> <section id="developer-guide">
<h2>Developer Guide<a class="headerlink" href="#developer-guide" title="Link to this heading">#</a></h2> <h2>Developer Guide<a class="headerlink" href="#developer-guide" title="Link to this heading">#</a></h2>
@ -391,12 +395,12 @@ sudo<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w
<span class="nb">cd</span><span class="w"> </span>pyladoc <span class="nb">cd</span><span class="w"> </span>pyladoc
</pre></div> </pre></div>
</div> </div>
<p>Its recommended to setup an venv:</p> <p>Its recommended to set up a venv:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>-m<span class="w"> </span>venv<span class="w"> </span>.venv <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>-m<span class="w"> </span>venv<span class="w"> </span>.venv
<span class="nb">source</span><span class="w"> </span>.venv/bin/activate<span class="w"> </span><span class="c1"># On Windows use `.venv\Scripts\activate`</span> <span class="nb">source</span><span class="w"> </span>.venv/bin/activate<span class="w"> </span><span class="c1"># On Windows use `.venv\Scripts\activate`</span>
</pre></div> </pre></div>
</div> </div>
<p>Install the package and dev-dependencies while keeping files in the <p>Install the package and development dependencies while keeping files in the
current directory:</p> current directory:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.<span class="o">[</span>dev<span class="o">]</span> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.<span class="o">[</span>dev<span class="o">]</span>
</pre></div> </pre></div>

File diff suppressed because one or more lines are too long