Skip to content

Commit

Permalink
deploy: 25ee24d
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipMay committed Oct 22, 2024
1 parent 7aae929 commit d3bf09e
Show file tree
Hide file tree
Showing 42 changed files with 911 additions and 552 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 94d71ffa86049851ccf68415db56ce21
config: 8f0daa7455353a7d46369d176bfa6512
tags: 645f666f9bcd5a90fca523b33c5a78b7
8 changes: 4 additions & 4 deletions _modules/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


<!DOCTYPE html>
<html class="writer-html5" lang="en">
<html class="writer-html5" lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand All @@ -14,9 +14,9 @@

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=b3ba4146"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../_static/copybutton.js?v=f281be69"></script>
<script src="../_static/js/theme.js"></script>
Expand Down
91 changes: 66 additions & 25 deletions _modules/mltb2/arangodb.html

Large diffs are not rendered by default.

40 changes: 29 additions & 11 deletions _modules/mltb2/bs.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


<!DOCTYPE html>
<html class="writer-html5" lang="en">
<html class="writer-html5" lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand All @@ -14,9 +14,9 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=b3ba4146"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../../_static/copybutton.js?v=f281be69"></script>
<script src="../../_static/js/theme.js"></script>
Expand Down Expand Up @@ -87,14 +87,16 @@ <h1>Source code for mltb2.bs</h1><div class="highlight"><pre>
<span class="sd"> ``pip install mltb2[bs]``</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">Optional</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Optional</span>

<span class="kn">import</span> <span class="nn">mdformat</span>
<span class="kn">from</span> <span class="nn">bs4</span> <span class="kn">import</span> <span class="n">BeautifulSoup</span>
<span class="kn">from</span> <span class="nn">markdownify</span> <span class="kn">import</span> <span class="n">MarkdownConverter</span><span class="p">,</span> <span class="n">markdownify</span>


<div class="viewcode-block" id="extract_text"><a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.extract_text">[docs]</a><span class="k">def</span> <span class="nf">extract_text</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">join_str</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<div class="viewcode-block" id="extract_text">
<a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.extract_text">[docs]</a>
<span class="k">def</span> <span class="nf">extract_text</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">join_str</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Extract the text from a BeautifulSoup object.</span>

<span class="sd"> Warning:</span>
Expand All @@ -113,7 +115,10 @@ <h1>Source code for mltb2.bs</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">result</span></div>


<div class="viewcode-block" id="extract_one"><a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.extract_one">[docs]</a><span class="k">def</span> <span class="nf">extract_one</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">attrs</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">Any</span><span class="p">:</span>

<div class="viewcode-block" id="extract_one">
<a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.extract_one">[docs]</a>
<span class="k">def</span> <span class="nf">extract_one</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">attrs</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">:</span> <span class="nb">dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">Any</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Extract exactly one specified element from a BeautifulSoup object.</span>

<span class="sd"> This function expacts that exactly only one result is found.</span>
Expand All @@ -138,7 +143,10 @@ <h1>Source code for mltb2.bs</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">result</span></div>


<div class="viewcode-block" id="extract_all"><a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.extract_all">[docs]</a><span class="k">def</span> <span class="nf">extract_all</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">attrs</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">Any</span><span class="p">:</span>

<div class="viewcode-block" id="extract_all">
<a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.extract_all">[docs]</a>
<span class="k">def</span> <span class="nf">extract_all</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">attrs</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">:</span> <span class="nb">dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">Any</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Extract all specified elements from a BeautifulSoup object.</span>

<span class="sd"> Args:</span>
Expand All @@ -155,7 +163,10 @@ <h1>Source code for mltb2.bs</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">result</span></div>


<div class="viewcode-block" id="remove_all"><a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.remove_all">[docs]</a><span class="k">def</span> <span class="nf">remove_all</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">attrs</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>

<div class="viewcode-block" id="remove_all">
<a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.remove_all">[docs]</a>
<span class="k">def</span> <span class="nf">remove_all</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">attrs</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">:</span> <span class="nb">dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Remove all specified elements from a BeautifulSoup object.</span>

<span class="sd"> The removal is done in place. Nothing is returned.</span>
Expand All @@ -173,7 +184,10 @@ <h1>Source code for mltb2.bs</h1><div class="highlight"><pre>
<span class="n">r</span><span class="o">.</span><span class="n">decompose</span><span class="p">()</span></div>


<div class="viewcode-block" id="soup_to_md"><a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.soup_to_md">[docs]</a><span class="k">def</span> <span class="nf">soup_to_md</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">mdformat_options</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>

<div class="viewcode-block" id="soup_to_md">
<a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.soup_to_md">[docs]</a>
<span class="k">def</span> <span class="nf">soup_to_md</span><span class="p">(</span><span class="n">soup</span><span class="p">:</span> <span class="n">BeautifulSoup</span><span class="p">,</span> <span class="n">mdformat_options</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Convert a BeautifulSoup object to Markdown.</span>

<span class="sd"> The default mdformat options are:</span>
Expand All @@ -198,7 +212,10 @@ <h1>Source code for mltb2.bs</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">text</span></div>


<div class="viewcode-block" id="html_to_md"><a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.html_to_md">[docs]</a><span class="k">def</span> <span class="nf">html_to_md</span><span class="p">(</span><span class="n">html</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">mdformat_options</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>

<div class="viewcode-block" id="html_to_md">
<a class="viewcode-back" href="../../api-reference/bs.html#mltb2.bs.html_to_md">[docs]</a>
<span class="k">def</span> <span class="nf">html_to_md</span><span class="p">(</span><span class="n">html</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">mdformat_options</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">dict</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Convert HTML to Markdown.</span>

<span class="sd"> The default mdformat options are:</span>
Expand All @@ -221,6 +238,7 @@ <h1>Source code for mltb2.bs</h1><div class="highlight"><pre>
<span class="n">text</span> <span class="o">=</span> <span class="n">markdownify</span><span class="p">(</span><span class="n">html</span><span class="p">)</span>
<span class="n">text</span> <span class="o">=</span> <span class="n">mdformat</span><span class="o">.</span><span class="n">text</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="n">mdformat_options</span><span class="p">)</span>
<span class="k">return</span> <span class="n">text</span></div>

</pre></div>

</div>
Expand Down
Loading

0 comments on commit d3bf09e

Please sign in to comment.