-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f6a742
commit b91a137
Showing
112 changed files
with
3,471 additions
and
16,289 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-5.15 KB
(95%)
docs/_build/doctrees/advertools.code_recipes.spider_strategies.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 963840fc3381ddee73e277c037c43fc9 | ||
config: 6d44d7111b7f1716309db46f215f3039 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
<!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" /> | ||
<title>advertools.ad_create — Python</title> | ||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../_static/sphinx-thebe.css" type="text/css" /> | ||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" /> | ||
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" /> | ||
|
||
|
||
<!--[if lt IE 9]> | ||
<script src="../../_static/js/html5shiv.min.js"></script> | ||
<![endif]--> | ||
|
||
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script> | ||
<script src="../../_static/jquery.js"></script> | ||
<script src="../../_static/underscore.js"></script> | ||
<script src="../../_static/doctools.js"></script> | ||
<script>const THEBE_JS_URL = "https://unpkg.com/[email protected]/lib/index.js" | ||
const thebe_selector = ".thebe,.cell" | ||
const thebe_selector_input = "pre" | ||
const thebe_selector_output = ".output, .cell_output" | ||
</script> | ||
<script async="async" src="../../_static/sphinx-thebe.js"></script> | ||
<script src="../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../_static/documentation_options.js?v=9e420a66"></script> | ||
<script src="../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script>const THEBE_JS_URL = "https://unpkg.com/[email protected]/lib/index.js"; const thebe_selector = ".thebe,.cell"; const thebe_selector_input = "pre"; const thebe_selector_output = ".output, .cell_output"</script> | ||
<script async="async" src="../../_static/sphinx-thebe.js?v=c100c467"></script> | ||
<script async="async" src="https://unpkg.com/[email protected]/lib/index.js"></script> | ||
<script>const THEBE_JS_URL = "https://unpkg.com/[email protected]/lib/index.js"; const thebe_selector = ".thebe,.cell"; const thebe_selector_input = "pre"; const thebe_selector_output = ".output, .cell_output"</script> | ||
<script src="../../_static/js/theme.js"></script> | ||
<link rel="index" title="Index" href="../../genindex.html" /> | ||
<link rel="search" title="Search" href="../../search.html" /> | ||
|
@@ -32,14 +32,18 @@ | |
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search" > | ||
<a href="../../index.html" class="icon icon-home"> advertools | ||
|
||
|
||
|
||
<a href="../../index.html" class="icon icon-home"> | ||
advertools | ||
</a> | ||
<div class="version"> | ||
0.13.5 | ||
0.14.0 | ||
</div> | ||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" /> | ||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
|
@@ -102,9 +106,9 @@ | |
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="../../index.html" class="icon icon-home"></a> »</li> | ||
<li><a href="../index.html">Module code</a> »</li> | ||
<li>advertools.ad_create</li> | ||
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li> | ||
<li class="breadcrumb-item"><a href="../index.html">Module code</a></li> | ||
<li class="breadcrumb-item active">advertools.ad_create</li> | ||
<li class="wy-breadcrumbs-aside"> | ||
</li> | ||
</ul> | ||
|
@@ -181,7 +185,9 @@ <h1>Source code for advertools.ad_create</h1><div class="highlight"><pre> | |
<span class="kn">import</span> <span class="nn">string</span> | ||
|
||
|
||
<div class="viewcode-block" id="ad_create"><a class="viewcode-back" href="../../advertools.ad_create.html#advertools.ad_create.ad_create">[docs]</a><span class="k">def</span> <span class="nf">ad_create</span><span class="p">(</span><span class="n">template</span><span class="p">,</span> <span class="n">replacements</span><span class="p">,</span> <span class="n">fallback</span><span class="p">,</span> <span class="n">max_len</span><span class="o">=</span><span class="mi">30</span><span class="p">,</span> <span class="n">capitalize</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span> | ||
<div class="viewcode-block" id="ad_create"> | ||
<a class="viewcode-back" href="../../advertools.ad_create.html#advertools.ad_create.ad_create">[docs]</a> | ||
<span class="k">def</span> <span class="nf">ad_create</span><span class="p">(</span><span class="n">template</span><span class="p">,</span> <span class="n">replacements</span><span class="p">,</span> <span class="n">fallback</span><span class="p">,</span> <span class="n">max_len</span><span class="o">=</span><span class="mi">30</span><span class="p">,</span> <span class="n">capitalize</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span> | ||
<span class="w"> </span><span class="sd">"""Insert each of the replacement strings in its place within template.</span> | ||
|
||
<span class="sd"> :param str template: a string format template, using braces e.g. "Get the</span> | ||
|
@@ -227,6 +233,7 @@ <h1>Source code for advertools.ad_create</h1><div class="highlight"><pre> | |
<span class="n">final_ad</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">template</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">fallback</span><span class="p">))</span> | ||
|
||
<span class="k">return</span> <span class="p">[</span><span class="n">string</span><span class="o">.</span><span class="n">capwords</span><span class="p">(</span><span class="n">s</span><span class="p">)</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="n">final_ad</span><span class="p">]</span> <span class="k">if</span> <span class="n">capitalize</span> <span class="k">else</span> <span class="n">final_ad</span></div> | ||
|
||
</pre></div> | ||
|
||
</div> | ||
|
@@ -236,7 +243,7 @@ <h1>Source code for advertools.ad_create</h1><div class="highlight"><pre> | |
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2022, Elias Dabbas.</p> | ||
<p>© Copyright 2024, Elias Dabbas.</p> | ||
</div> | ||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
<!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" /> | ||
<title>advertools.ad_from_string — Python</title> | ||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../_static/sphinx-thebe.css" type="text/css" /> | ||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" /> | ||
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" /> | ||
|
||
|
||
<!--[if lt IE 9]> | ||
<script src="../../_static/js/html5shiv.min.js"></script> | ||
<![endif]--> | ||
|
||
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script> | ||
<script src="../../_static/jquery.js"></script> | ||
<script src="../../_static/underscore.js"></script> | ||
<script src="../../_static/doctools.js"></script> | ||
<script>const THEBE_JS_URL = "https://unpkg.com/[email protected]/lib/index.js" | ||
const thebe_selector = ".thebe,.cell" | ||
const thebe_selector_input = "pre" | ||
const thebe_selector_output = ".output, .cell_output" | ||
</script> | ||
<script async="async" src="../../_static/sphinx-thebe.js"></script> | ||
<script src="../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../_static/documentation_options.js?v=9e420a66"></script> | ||
<script src="../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script>const THEBE_JS_URL = "https://unpkg.com/[email protected]/lib/index.js"; const thebe_selector = ".thebe,.cell"; const thebe_selector_input = "pre"; const thebe_selector_output = ".output, .cell_output"</script> | ||
<script async="async" src="../../_static/sphinx-thebe.js?v=c100c467"></script> | ||
<script async="async" src="https://unpkg.com/[email protected]/lib/index.js"></script> | ||
<script>const THEBE_JS_URL = "https://unpkg.com/[email protected]/lib/index.js"; const thebe_selector = ".thebe,.cell"; const thebe_selector_input = "pre"; const thebe_selector_output = ".output, .cell_output"</script> | ||
<script src="../../_static/js/theme.js"></script> | ||
<link rel="index" title="Index" href="../../genindex.html" /> | ||
<link rel="search" title="Search" href="../../search.html" /> | ||
|
@@ -32,14 +32,18 @@ | |
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search" > | ||
<a href="../../index.html" class="icon icon-home"> advertools | ||
|
||
|
||
|
||
<a href="../../index.html" class="icon icon-home"> | ||
advertools | ||
</a> | ||
<div class="version"> | ||
0.13.5 | ||
0.14.0 | ||
</div> | ||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" /> | ||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
|
@@ -102,9 +106,9 @@ | |
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="../../index.html" class="icon icon-home"></a> »</li> | ||
<li><a href="../index.html">Module code</a> »</li> | ||
<li>advertools.ad_from_string</li> | ||
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li> | ||
<li class="breadcrumb-item"><a href="../index.html">Module code</a></li> | ||
<li class="breadcrumb-item active">advertools.ad_from_string</li> | ||
<li class="wy-breadcrumbs-aside"> | ||
</li> | ||
</ul> | ||
|
@@ -278,7 +282,9 @@ <h1>Source code for advertools.ad_from_string</h1><div class="highlight"><pre> | |
<span class="kn">import</span> <span class="nn">string</span> | ||
|
||
|
||
<div class="viewcode-block" id="ad_from_string"><a class="viewcode-back" href="../../advertools.ad_from_string.html#advertools.ad_from_string.ad_from_string">[docs]</a><span class="k">def</span> <span class="nf">ad_from_string</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">slots</span><span class="o">=</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="mi">90</span><span class="p">,</span> <span class="mi">90</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">15</span><span class="p">),</span> <span class="n">sep</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> | ||
<div class="viewcode-block" id="ad_from_string"> | ||
<a class="viewcode-back" href="../../advertools.ad_from_string.html#advertools.ad_from_string.ad_from_string">[docs]</a> | ||
<span class="k">def</span> <span class="nf">ad_from_string</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">slots</span><span class="o">=</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="mi">90</span><span class="p">,</span> <span class="mi">90</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">15</span><span class="p">),</span> <span class="n">sep</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> | ||
<span class="n">capitalize</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span> | ||
<span class="w"> </span><span class="sd">"""Convert string :attr:`s` to an ad by splitting it into groups of words.</span> | ||
<span class="sd"> Each group would have a length of at most the allowed length for that slot.</span> | ||
|
@@ -331,6 +337,7 @@ <h1>Source code for advertools.ad_from_string</h1><div class="highlight"><pre> | |
<span class="k">if</span> <span class="n">sep</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="s1">' '</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">str_words</span><span class="p">[</span><span class="n">counter</span><span class="p">:]))</span> | ||
|
||
<span class="k">return</span> <span class="p">[</span><span class="n">string</span><span class="o">.</span><span class="n">capwords</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">if</span> <span class="n">capitalize</span> <span class="k">else</span> <span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">text_ad</span><span class="p">]</span></div> | ||
|
||
</pre></div> | ||
|
||
</div> | ||
|
@@ -340,7 +347,7 @@ <h1>Source code for advertools.ad_from_string</h1><div class="highlight"><pre> | |
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2022, Elias Dabbas.</p> | ||
<p>© Copyright 2024, Elias Dabbas.</p> | ||
</div> | ||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | ||
|
Oops, something went wrong.