ESP-NOW RC Tutorial

This commit is contained in:
2025-06-29 18:18:44 -04:00
parent 240f7b5dc1
commit 851564c8a7
2857 changed files with 529415 additions and 17 deletions

View File

@@ -0,0 +1,28 @@
Copyright 2010 Pallets
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,92 @@
Metadata-Version: 2.1
Name: MarkupSafe
Version: 3.0.2
Summary: Safely add untrusted strings to HTML/XML markup.
Maintainer-email: Pallets <contact@palletsprojects.com>
License: Copyright 2010 Pallets
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project-URL: Donate, https://palletsprojects.com/donate
Project-URL: Documentation, https://markupsafe.palletsprojects.com/
Project-URL: Changes, https://markupsafe.palletsprojects.com/changes/
Project-URL: Source, https://github.com/pallets/markupsafe/
Project-URL: Chat, https://discord.gg/pallets
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
# MarkupSafe
MarkupSafe implements a text object that escapes characters so it is
safe to use in HTML and XML. Characters that have special meanings are
replaced so that they display as the actual characters. This mitigates
injection attacks, meaning untrusted user input can safely be displayed
on a page.
## Examples
```pycon
>>> from markupsafe import Markup, escape
>>> # escape replaces special characters and wraps in Markup
>>> escape("<script>alert(document.cookie);</script>")
Markup('&lt;script&gt;alert(document.cookie);&lt;/script&gt;')
>>> # wrap in Markup to mark text "safe" and prevent escaping
>>> Markup("<strong>Hello</strong>")
Markup('<strong>hello</strong>')
>>> escape(Markup("<strong>Hello</strong>"))
Markup('<strong>hello</strong>')
>>> # Markup is a str subclass
>>> # methods and operators escape their arguments
>>> template = Markup("Hello <em>{name}</em>")
>>> template.format(name='"World"')
Markup('Hello <em>&#34;World&#34;</em>')
```
## Donate
The Pallets organization develops and supports MarkupSafe and other
popular packages. In order to grow the community of contributors and
users, and allow the maintainers to devote more time to the projects,
[please donate today][].
[please donate today]: https://palletsprojects.com/donate

View File

@@ -0,0 +1,14 @@
MarkupSafe-3.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
MarkupSafe-3.0.2.dist-info/LICENSE.txt,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475
MarkupSafe-3.0.2.dist-info/METADATA,sha256=aAwbZhSmXdfFuMM-rEHpeiHRkBOGESyVLJIuwzHP-nw,3975
MarkupSafe-3.0.2.dist-info/RECORD,,
MarkupSafe-3.0.2.dist-info/WHEEL,sha256=OVgtqZzfzIXXtylXP90gxCZ6CKBCwKYyHM8PpMEjN1M,151
MarkupSafe-3.0.2.dist-info/top_level.txt,sha256=qy0Plje5IJuvsCBjejJyhDCjEAdcDLK_2agVcex8Z6U,11
markupsafe/__init__.py,sha256=sr-U6_27DfaSrj5jnHYxWN-pvhM27sjlDplMDPZKm7k,13214
markupsafe/__pycache__/__init__.cpython-312.pyc,,
markupsafe/__pycache__/_native.cpython-312.pyc,,
markupsafe/_native.py,sha256=hSLs8Jmz5aqayuengJJ3kdT5PwNpBWpKrmQSdipndC8,210
markupsafe/_speedups.c,sha256=O7XulmTo-epI6n2FtMVOrJXl8EAaIwD2iNYmBI5SEoQ,4149
markupsafe/_speedups.cpython-312-x86_64-linux-gnu.so,sha256=t1DBZlpsjFA30BOOvXfXfT1wvO_4cS16VbHz1-49q5U,43432
markupsafe/_speedups.pyi,sha256=ENd1bYe7gbBUf2ywyYWOGUpnXOHNJ-cgTNqetlW8h5k,41
markupsafe/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0

View File

@@ -0,0 +1,6 @@
Wheel-Version: 1.0
Generator: setuptools (75.2.0)
Root-Is-Purelib: false
Tag: cp312-cp312-manylinux_2_17_x86_64
Tag: cp312-cp312-manylinux2014_x86_64

View File

@@ -0,0 +1,34 @@
Copyright (c) 2020 Jeff Forcier.
Based on original work copyright (c) 2011 Kenneth Reitz and copyright (c) 2010
Armin Ronacher.
Some rights reserved.
Redistribution and use in source and binary forms of the theme, with or
without modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,66 @@
Metadata-Version: 2.1
Name: alabaster
Version: 1.0.0
Summary: A light, configurable Sphinx theme
Maintainer: Adam Turner
Maintainer-email: Jeff Forcier <jeff@bitprophet.org>
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Sphinx
Classifier: Framework :: Sphinx :: Theme
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Documentation
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Software Development :: Documentation
Project-URL: Changelog, https://alabaster.readthedocs.io/en/latest/changelog.html
Project-URL: Documentation, https://alabaster.readthedocs.io/
Project-URL: Download, https://pypi.org/project/alabaster/
Project-URL: Homepage, https://alabaster.readthedocs.io/
Project-URL: Issue tracker, https://github.com/sphinx-doc/alabaster/issues
Project-URL: Source, https://github.com/sphinx-doc/alabaster
.. image:: https://img.shields.io/pypi/v/alabaster.svg
:target: https://pypi.org/project/alabaster/
:alt: Package on PyPI
.. image:: https://github.com/sphinx-doc/alabaster/actions/workflows/test.yml/badge.svg
:target: https://github.com/sphinx-doc/alabaster/actions/workflows/test.yml
:alt: CI Status
.. image:: https://readthedocs.org/projects/alabaster/badge/
:target: https://alabaster.readthedocs.io/
:alt: Documentation Status
.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
:target: https://opensource.org/license/BSD-3-Clause
:alt: BSD 3 Clause
What is Alabaster?
==================
Alabaster is a visually (c)lean, responsive, configurable theme for the `Sphinx
<https://www.sphinx-doc.org>`_ documentation system.
It requires Python 3.10 or newer and Sphinx 6.2 or newer.
It began as a third-party theme, and is still maintained separately, but as of
Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected
as the default theme.
Live examples of this theme can be seen on `this project's own website
<https://alabaster.readthedocs.io/>`_, `paramiko.org <https://www.paramiko.org>`_,
`fabfile.org <https://www.fabfile.org>`_ and `pyinvoke.org <https://www.pyinvoke.org>`_.
For more documentation, please see https://alabaster.readthedocs.io/.

View File

@@ -0,0 +1,19 @@
alabaster-1.0.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
alabaster-1.0.0.dist-info/LICENSE.rst,sha256=glPwq6rQWn3uGgikNwWsLeH3O9fUTP4BAQ7MEEzEKFE,1555
alabaster-1.0.0.dist-info/METADATA,sha256=SO51NQKjPl5_WiPbXwHPQpgdR7OPld2cHvFoU88Mvlc,2826
alabaster-1.0.0.dist-info/RECORD,,
alabaster-1.0.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
alabaster-1.0.0.dist-info/entry_points.txt,sha256=AP1-Cq22vDSvDCIoAPwLjXsB6VqcBRdIXlTRwBzwqUo,42
alabaster/__init__.py,sha256=vSVH6mRLzT_CDX0rmyqq-JuRJ8Bbvc-QgWnFJhFqqtw,1273
alabaster/__pycache__/__init__.cpython-312.pyc,,
alabaster/__pycache__/support.cpython-312.pyc,,
alabaster/about.html,sha256=0ii3_RJbxMPkAQL4nrBCedhFSWlQJIDsLN5A7PY9FP4,1988
alabaster/donate.html,sha256=R1t8L-Cdj0g_JfT89r74wzYjNUCiqIpn0XPPxP5Pj4k,866
alabaster/layout.html,sha256=yUlk53J2J8nghghhKxGdPkte_0e8U3IGzUKLnfHtjvU,4294
alabaster/navigation.html,sha256=6C7cQsADkUslTvMFco342rDCKM2K92L6G42nQhyPSpo,323
alabaster/relations.html,sha256=o2E4TGqSZv0b_NO4RVo2PNYgDWE3RBfQ5Jueq5d8jsM,665
alabaster/static/alabaster.css_t,sha256=ZZdTv9fEx_1HRoAwudo0omXT1NcgIvKzeDNs3cTK6cM,15236
alabaster/static/custom.css,sha256=OfI6ZWF4bjy04z5KllYqEwWot0wNRdwhWmQBhpLNXUw,42
alabaster/static/github-banner.svg,sha256=eDQGiXREC60OAHL5djJttj2vQOquSn9hzWrSfc8l86U,490
alabaster/support.py,sha256=sUmHRioKyQdzsgtUi-8IdpICoi5JaE8U3pJ0MLDRVcc,3937
alabaster/theme.conf,sha256=tWvJVCqi-A9ttN6oBaD6abRXO66L7NVqgepfh_P7ib0,2468

View File

@@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: flit 3.9.0
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -0,0 +1,3 @@
[sphinx.html_themes]
alabaster=alabaster

View File

@@ -0,0 +1,39 @@
import os
__version_info__ = (1, 0, 0)
__version__ = "1.0.0"
def get_path():
"""
Shortcut for users whose theme is next to their conf.py.
"""
# Theme directory is defined as our parent directory
return os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def update_context(app, pagename, templatename, context, doctree):
context["alabaster_version"] = __version__
context["alabaster_version_info"] = __version_info__
# Convert 'show_powered_by' in the theme options to
# the preferred option, html_show_sphinx.
html_theme_options = app.config.html_theme_options
if "show_powered_by" in html_theme_options:
show_powered_by = html_theme_options["show_powered_by"]
if isinstance(show_powered_by, str):
context["show_sphinx"] = show_powered_by.lower() == "true"
else:
context["show_sphinx"] = bool(show_powered_by) # to allow int values
def setup(app):
app.require_sphinx("6.2")
theme_path = os.path.abspath(os.path.dirname(__file__))
app.add_html_theme("alabaster", theme_path)
app.connect("html-page-context", update_context)
return {
"version": __version__,
"parallel_read_safe": True,
"parallel_write_safe": True,
}

View File

@@ -0,0 +1,59 @@
{% if theme_logo %}
<p class="logo">
<a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/' ~ theme_logo, 1) }}" alt="Logo" />
{% if theme_logo_name|lower == 'true' %}
<h1 class="logo logo-name">{{ project }}</h1>
{% elif theme_logo_name|lower != 'false' %}
<h1 class="logo logo-name">{{ theme_logo_name }}</h1>
{% endif %}
</a>
</p>
{% else %}
<h1 class="logo"><a href="{{ pathto(master_doc) }}">{{ project }}</a></h1>
{% endif %}
{% if theme_description %}
<p class="blurb">{{ theme_description }}</p>
{% endif %}
{% if theme_github_user and theme_github_repo %}
{% if theme_github_button|lower == 'true' %}
<p>
<iframe src="https://ghbtns.com/github-btn.html?user={{ theme_github_user }}&repo={{ theme_github_repo }}&type={{ theme_github_type }}&count={{ theme_github_count }}&size=large&v=2"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
{% endif %}
{% endif %}
{% if theme_travis_button|lower != 'false' %}
{% if theme_travis_button|lower == 'true' %}
{% set path = theme_github_user + '/' + theme_github_repo %}
{% else %}
{% set path = theme_travis_button %}
{% endif %}
<p>
<a class="badge" href="https://travis-ci.org/{{ path }}">
<img
alt="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
src="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
/>
</a>
</p>
{% endif %}
{% if theme_codecov_button|lower != 'false' %}
{% if theme_codecov_button|lower == 'true' %}
{% set path = theme_github_user + '/' + theme_github_repo %}
{% else %}
{% set path = theme_codecov_button %}
{% endif %}
<p>
<a class="badge" href="https://codecov.io/github/{{ path }}">
<img
alt="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
src="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
/>
</a>
</p>
{% endif %}

View File

@@ -0,0 +1,28 @@
{# TODO: wrap all these in their own divs for easier styling #}
{% if theme_donate_url or theme_opencollective or theme_tidelift_url %}
<h3 class="donation">Donate/support</h3>
{% endif %}
{% if theme_donate_url %}
<p>
<a class="badge" href="{{ theme_donate_url }}">
<img src="https://img.shields.io/badge/donate-%E2%9D%A4%C2%A0-ff69b4.svg?style=flat" alt="Donate">
</a>
</p>
{% endif %}
{% if theme_opencollective %}
<p>
<a class="badge" href="https://opencollective.com/{{ theme_opencollective }}/donate" target="_blank">
<img src="https://opencollective.com/{{ theme_opencollective }}/donate/button.png?color={{ theme_opencollective_button_color }}" width=300 />
</a>
</p>
{% endif %}
{% if theme_tidelift_url %}
<p>
Professionally-supported {{ project }} is available with the
<a href="{{ theme_tidelift_url }}">Tidelift Subscription</a>.
</p>
{% endif %}

View File

@@ -0,0 +1,130 @@
{%- extends "basic/layout.html" %}
{%- block extrahead %}
{{ super() }}
<link rel="stylesheet" href="{{ pathto('_static/custom.css', resource=True) }}" type="text/css" />
{% if theme_touch_icon %}
<link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, resource=True) }}" />
{% endif %}
{# Deprecated in favor of html_baseurl (pageurl). This is already set in the basic theme #}
{% if theme_canonical_url and not pageurl %}
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html" />
{% endif %}
{% endblock %}
{# top+bottom related navs; we also have our own in sidebar #}
{%- macro rellink_markup() %}
<nav id="rellinks">
<ul>
{%- if prev %}
<li>
&larr;
<a href="{{ prev.link|e }}" title="Previous document">{{ prev.title }}</a>
</li>
{%- endif %}
{%- if next %}
<li>
<a href="{{ next.link|e }}" title="Next document">{{ next.title }}</a>
&rarr;
</li>
{%- endif %}
</ul>
</nav>
{%- endmacro %}
{%- set theme_show_relbar_top = theme_show_relbar_top or theme_show_relbars %}
{%- set theme_show_relbar_bottom = theme_show_relbar_bottom or theme_show_relbars %}
{# removed existing top+bottom related nav, and embed in main content #}
{%- block relbar1 %}{% endblock %}
{%- block relbar2 %}{% endblock %}
{# Nav should appear before content, not after #}
{%- block content %}
{%- if theme_fixed_sidebar|lower == 'true' %}
<div class="document">
{{ sidebar() }}
{%- block document %}
<div class="documentwrapper">
{%- if render_sidebar %}
<div class="bodywrapper">
{%- endif %}
{%- block relbar_top %}
{%- if theme_show_relbar_top|tobool %}
<div class="related top">
&nbsp;
{{- rellink_markup () }}
</div>
{%- endif %}
{% endblock %}
<div class="body" role="main">
{% block body %} {% endblock %}
</div>
{%- block relbar_bottom %}
{%- if theme_show_relbar_bottom|tobool %}
<div class="related bottom">
&nbsp;
{{- rellink_markup () }}
</div>
{%- endif %}
{% endblock %}
{%- if render_sidebar %}
</div>
{%- endif %}
</div>
{%- endblock %}
<div class="clearer"></div>
</div>
{%- else %}
{{ super() }}
{%- endif %}
{%- endblock %}
{%- block footer %}
<div class="footer">
{% if show_copyright %}&#169;{{ copyright }}.{% endif %}
{% if show_sphinx %}
{% if show_copyright %}|{% endif %}
Powered by <a href="https://www.sphinx-doc.org/">Sphinx {{ sphinx_version }}</a>
&amp; <a href="https://alabaster.readthedocs.io">Alabaster {{ alabaster_version }}</a>
{% endif %}
{%- if show_source and has_source and sourcename %}
{% if show_copyright or show_sphinx %}|{% endif %}
<a href="{{ pathto('_sources/' + sourcename, resource=True)|e }}"
rel="nofollow">{{ _('Page source') }}</a>
{%- endif %}
</div>
{% if theme_github_banner|lower != 'false' %}
<a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}" class="github">
{%- if theme_github_banner|lower == 'true' %}
<img src="{{ pathto('_static/github-banner.svg', resource=True) }}" alt="Fork me on GitHub" class="github"/>
{%- else %}
<img src="{{ pathto('_static/' ~ theme_github_banner, resource=True) }}" alt="Fork me on GitHub" class="github"/>
{%- endif %}
</a>
{% endif %}
{% if theme_analytics_id %}
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ theme_analytics_id }}']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'https://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}
{%- endblock %}

View File

@@ -0,0 +1,10 @@
<h3>{{ _('Navigation') }}</h3>
{{ toctree(includehidden=theme_sidebar_includehidden, collapse=theme_sidebar_collapse) }}
{% if theme_extra_nav_links %}
<hr />
<ul>
{% for text, uri in theme_extra_nav_links.items() %}
<li class="toctree-l1"><a href="{{ uri }}">{{ text }}</a></li>
{% endfor %}
</ul>
{% endif %}

View File

@@ -0,0 +1,21 @@
<div class="relations">
<h3>{{ _('Related Topics') }}</h3>
<ul>
<li><a href="{{ pathto(master_doc) }}">{{ _('Documentation overview') }}</a><ul>
{%- for parent in parents %}
<li><a href="{{ parent.link|e }}">{{ parent.title }}</a><ul>
{%- endfor %}
{%- if prev %}
<li>{{ _('Previous') }}: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
}}">{{ prev.title }}</a></li>
{%- endif %}
{%- if next %}
<li>{{ _('Next') }}: <a href="{{ next.link|e }}" title="{{ _('next chapter')
}}">{{ next.title }}</a></li>
{%- endif %}
{%- for parent in parents %}
</ul></li>
{%- endfor %}
</ul></li>
</ul>
</div>

View File

@@ -0,0 +1,735 @@
{%- set theme_body_bg = theme_body_bg or theme_base_bg %}
{%- set theme_sidebar_header = theme_sidebar_header or theme_gray_1 %}
{%- set theme_sidebar_link = theme_sidebar_link or theme_gray_1 %}
{%- set theme_anchor_hover_fg = theme_anchor_hover_fg or theme_gray_1 %}
{%- set theme_footnote_border = theme_footnote_border or theme_gray_2 %}
{%- set theme_pre_bg = theme_pre_bg or 'unset' %}
{%- set theme_head_font_family = theme_head_font_family or theme_font_family %}
{#- set up admonition styling #}
{#- - basic level #}
{%- set theme_admonition_xref_bg = theme_admonition_xref_bg or theme_xref_bg %}
{%- set theme_admonition_bg = theme_admonition_bg or theme_gray_2 %}
{%- set theme_note_bg = theme_note_bg or theme_gray_2 %}
{%- set theme_seealso_bg = theme_seealso_bg or theme_gray_2 %}
{#- - critical level #}
{%- set theme_danger_bg = theme_danger_bg or theme_pink_1 %}
{%- set theme_danger_border = theme_danger_border or theme_pink_2 %}
{%- set theme_danger_shadow = theme_danger_shadow or theme_pink_3 %}
{%- set theme_error_bg = theme_error_bg or theme_pink_1 %}
{%- set theme_error_border = theme_error_border or theme_pink_2 %}
{%- set theme_error_shadow = theme_error_shadow or theme_pink_3 %}
{#- - warning level #}
{%- set theme_caution_bg = theme_caution_bg or theme_pink_1 %}
{%- set theme_caution_border = theme_caution_border or theme_pink_2 %}
{%- set theme_attention_bg = theme_attention_bg or theme_pink_1 %}
{%- set theme_attention_border = theme_attention_border or theme_pink_2 %}
{%- set theme_warn_bg = theme_warn_bg or theme_pink_1 %}
{%- set theme_warn_border = theme_warn_border or theme_pink_2 %}
{#- - normal level #}
{%- set theme_important_bg = theme_important_bg or theme_gray_2 %}
{%- set theme_tip_bg = theme_tip_bg or theme_gray_2 %}
{%- set theme_hint_bg = theme_hint_bg or theme_gray_2 %}
{#- /set up admonition styling #}
{%- set theme_shadow = theme_shadow or theme_gray_2 %}
{%- set theme_topic_bg = theme_topic_bg or theme_gray_2 %}
{%- set theme_narrow_sidebar_link = theme_narrow_sidebar_link or theme_gray_3 %}
{%- set theme_sidebar_hr = theme_sidebar_hr or theme_gray_3 %}
{%- set theme_relbar_border = theme_relbar_border or theme_gray_2 -%}
/* -- page layout ----------------------------------------------------------- */
body {
font-family: {{ theme_font_family }};
font-size: {{ theme_font_size }};
background-color: {{ theme_base_bg }};
color: {{ theme_base_text }};
margin: 0;
padding: 0;
}
div.document {
width: {{ theme_page_width }};
margin: 30px auto 0 auto;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 {{ theme_sidebar_width }};
}
div.sphinxsidebar {
width: {{ theme_sidebar_width }};
font-size: 14px;
line-height: 1.5;
}
hr {
border: 1px solid {{ theme_hr_border }};
}
div.body {
background-color: {{ theme_body_bg }};
color: {{ theme_body_text }};
padding: 0 30px 0 30px;
}
div.body > .section {
text-align: {{ theme_body_text_align }};
}
div.footer {
width: {{ theme_page_width }};
margin: 20px auto 30px auto;
font-size: 14px;
color: {{ theme_footer_text }};
text-align: right;
}
div.footer a {
color: {{ theme_footer_text }};
}
p.caption {
font-family: {{ theme_caption_font_family }};
font-size: {{ theme_caption_font_size }};
}
{% if theme_show_related|lower == 'false' %}
div.relations {
display: none;
}
{% endif %}
div.sphinxsidebar {
max-height: 100%;
overflow-y: auto;
}
div.sphinxsidebar a {
color: {{ theme_sidebar_link }};
text-decoration: none;
border-bottom: 1px dotted {{ theme_sidebar_link_underscore }};
}
div.sphinxsidebar a:hover {
border-bottom: 1px solid {{ theme_sidebar_link_underscore }};
}
div.sphinxsidebarwrapper {
padding: 18px 10px;
}
div.sphinxsidebarwrapper p.logo {
padding: 0;
margin: -10px 0 0 0px;
text-align: center;
}
div.sphinxsidebarwrapper h1.logo {
margin-top: -10px;
text-align: center;
margin-bottom: 5px;
text-align: {{ theme_logo_text_align }};
}
div.sphinxsidebarwrapper h1.logo-name {
margin-top: 0px;
}
div.sphinxsidebarwrapper p.blurb {
margin-top: 0;
font-style: {{ theme_description_font_style }};
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: {{ theme_head_font_family }};
color: {{ theme_sidebar_header }};
font-size: 24px;
font-weight: normal;
margin: 0 0 5px 0;
padding: 0;
}
div.sphinxsidebar h4 {
font-size: 20px;
}
div.sphinxsidebar h3 a {
color: {{ theme_sidebar_link }};
}
div.sphinxsidebar p.logo a,
div.sphinxsidebar h3 a,
div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
border: none;
}
div.sphinxsidebar p {
color: {{ theme_sidebar_text }};
margin: 10px 0;
}
div.sphinxsidebar ul {
margin: 10px 0;
padding: 0;
color: {{ theme_sidebar_list }};
}
div.sphinxsidebar ul li.toctree-l1 > a {
font-size: 120%;
}
div.sphinxsidebar ul li.toctree-l2 > a {
font-size: 110%;
}
div.sphinxsidebar input {
border: 1px solid {{ theme_sidebar_search_button }};
font-family: {{ theme_font_family }};
font-size: 1em;
}
div.sphinxsidebar #searchbox {
margin: 1em 0;
}
div.sphinxsidebar .search > div {
display: table-cell;
}
div.sphinxsidebar hr {
border: none;
height: 1px;
color: {{ theme_sidebar_hr }};
background: {{ theme_sidebar_hr }};
text-align: left;
margin-left: 0;
width: 50%;
}
div.sphinxsidebar .badge {
border-bottom: none;
}
div.sphinxsidebar .badge:hover {
border-bottom: none;
}
/* To address an issue with donation coming after search */
div.sphinxsidebar h3.donation {
margin-top: 10px;
}
/* -- body styles ----------------------------------------------------------- */
a {
color: {{ theme_link }};
text-decoration: underline;
}
a:hover {
color: {{ theme_link_hover }};
text-decoration: underline;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: {{ theme_head_font_family }};
font-weight: normal;
margin: 30px 0px 10px 0px;
padding: 0;
}
div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
div.body h2 { font-size: 180%; }
div.body h3 { font-size: 150%; }
div.body h4 { font-size: 130%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: {{ theme_anchor }};
padding: 0 4px;
text-decoration: none;
}
a.headerlink:hover {
color: {{ theme_anchor_hover_fg }};
background: {{ theme_anchor_hover_bg }};
}
div.body p, div.body dd, div.body li {
line-height: 1.4em;
}
div.admonition {
margin: 20px 0px;
padding: 10px 30px;
background-color: {{ theme_admonition_bg }};
border: 1px solid {{ theme_admonition_border }};
}
div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
background-color: {{ theme_admonition_xref_bg }};
border-bottom: 1px solid {{ theme_admonition_xref_border }};
}
div.admonition p.admonition-title {
font-family: {{ theme_head_font_family }};
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
line-height: 1;
}
div.admonition p.last {
margin-bottom: 0;
}
{%- if theme_code_highlight_bg %}
div.highlight {
background-color: {{ theme_code_highlight_bg }};
}
{%- endif %}
dt:target, .highlight {
background: {{ theme_highlight_bg }};
}
div.warning {
background-color: {{ theme_warn_bg }};
border: 1px solid {{ theme_warn_border }};
}
div.danger {
background-color: {{ theme_danger_bg }};
border: 1px solid {{ theme_danger_border }};
-moz-box-shadow: 2px 2px 4px {{ theme_danger_shadow }};
-webkit-box-shadow: 2px 2px 4px {{ theme_danger_shadow }};
box-shadow: 2px 2px 4px {{ theme_danger_shadow }};
}
div.error {
background-color: {{ theme_error_bg }};
border: 1px solid {{ theme_error_border }};
-moz-box-shadow: 2px 2px 4px {{ theme_error_shadow }};
-webkit-box-shadow: 2px 2px 4px {{ theme_error_shadow }};
box-shadow: 2px 2px 4px {{ theme_error_shadow }};
}
div.caution {
background-color: {{ theme_caution_bg }};
border: 1px solid {{ theme_caution_border }};
}
div.attention {
background-color: {{ theme_attention_bg }};
border: 1px solid {{ theme_attention_border }};
}
div.important {
background-color: {{ theme_important_bg }};
border: 1px solid {{ theme_important_border }};
}
div.note {
background-color: {{ theme_note_bg }};
border: 1px solid {{ theme_note_border }};
}
div.tip {
background-color: {{ theme_tip_bg }};
border: 1px solid {{ theme_tip_border }};
}
div.hint {
background-color: {{ theme_hint_bg }};
border: 1px solid {{ theme_hint_border }};
}
div.seealso {
background-color: {{ theme_seealso_bg }};
border: 1px solid {{ theme_seealso_border }};
}
div.topic {
background-color: {{ theme_topic_bg }};
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre, tt, code {
font-family: {{theme_code_font_family}};
font-size: {{ theme_code_font_size }};
}
.hll {
background-color: {{theme_code_highlight}};
margin: 0 -12px;
padding: 0 12px;
display: block;
}
img.screenshot {
}
tt.descname, tt.descclassname, code.descname, code.descclassname {
font-size: 0.95em;
}
tt.descname, code.descname {
padding-right: 0.08em;
}
img.screenshot {
-moz-box-shadow: 2px 2px 4px {{ theme_shadow }};
-webkit-box-shadow: 2px 2px 4px {{ theme_shadow }};
box-shadow: 2px 2px 4px {{ theme_shadow }};
}
table.docutils {
border: 1px solid {{ theme_table_border }};
-moz-box-shadow: 2px 2px 4px {{ theme_shadow }};
-webkit-box-shadow: 2px 2px 4px {{ theme_shadow }};
box-shadow: 2px 2px 4px {{ theme_shadow }};
}
table.docutils td, table.docutils th {
border: 1px solid {{ theme_table_border }};
padding: 0.25em 0.7em;
}
table.field-list, table.footnote {
border: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
table.footnote {
margin: 15px 0;
width: 100%;
border: 1px solid {{ theme_footnote_border }};
background: {{ theme_footnote_bg }};
font-size: 0.9em;
}
table.footnote + table.footnote {
margin-top: -15px;
border-top: none;
}
table.field-list th {
padding: 0 0.8em 0 0;
}
table.field-list td {
padding: 0;
}
table.field-list p {
margin-bottom: 0.8em;
}
/* Cloned from
* https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68
*/
.field-name {
-moz-hyphens: manual;
-ms-hyphens: manual;
-webkit-hyphens: manual;
hyphens: manual;
}
table.footnote td.label {
width: .1px;
padding: 0.3em 0 0.3em 0.5em;
}
table.footnote td {
padding: 0.3em 0.5em;
}
dl {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding: 0;
}
dl dd {
margin-left: 30px;
}
blockquote {
margin: 0 0 0 30px;
padding: 0;
}
ul, ol {
/* Matches the 30px from the narrow-screen "li > ul" selector below */
margin: 10px 0 10px 30px;
padding: 0;
}
pre {
background: {{ theme_pre_bg }};
padding: 7px 30px;
margin: 15px 0px;
line-height: 1.3em;
}
div.viewcode-block:target {
background: {{ theme_viewcode_target_bg }};
}
dl pre, blockquote pre, li pre {
margin-left: 0;
padding-left: 30px;
}
tt, code {
background-color: {{ theme_code_bg }};
color: {{ theme_code_text }};
/* padding: 1px 2px; */
}
tt.xref, code.xref, a tt {
background-color: {{ theme_xref_bg }};
border-bottom: 1px solid {{ theme_xref_border }};
}
a.reference {
text-decoration: none;
border-bottom: 1px dotted {{ theme_link }};
}
a.reference:hover {
border-bottom: 1px solid {{ theme_link_hover }};
}
/* Don't put an underline on images */
a.image-reference, a.image-reference:hover {
border-bottom: none;
}
a.footnote-reference {
text-decoration: none;
font-size: 0.7em;
vertical-align: top;
border-bottom: 1px dotted {{ theme_link }};
}
a.footnote-reference:hover {
border-bottom: 1px solid {{ theme_link_hover }};
}
a:hover tt, a:hover code {
background: {{ theme_code_hover }};
}
{%- if theme_fixed_sidebar|lower == 'true' %}
div.sphinxsidebar {
position: fixed;
margin-left: 0;
}
{%- endif %}
@media screen and (max-width: {{ theme_page_width }}) {
body {
margin: 0;
padding: 20px 30px;
}
div.documentwrapper {
float: none;
background: {{ theme_base_bg }};
margin-left: 0;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
}
div.sphinxsidebar {
display: block;
float: none;
width: unset;
{%- if theme_fixed_sidebar|lower == 'true' %}
margin: -20px -30px 20px -30px;
position: static;
{%- else %}
margin: 50px -30px -20px -30px;
{%- endif %}
padding: 10px 20px;
background: {{ theme_narrow_sidebar_bg }};
color: {{ theme_narrow_sidebar_fg }};
}
div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
div.sphinxsidebar h3 a {
color: {{ theme_base_bg }};
}
div.sphinxsidebar a {
color: {{ theme_narrow_sidebar_link }};
}
div.sphinxsidebar p.logo {
display: none;
}
div.document {
width: 100%;
margin: 0;
}
div.footer {
display: none;
}
div.bodywrapper {
margin: 0;
}
div.body {
min-height: 0;
min-width: auto; /* fixes width on small screens, breaks .hll */
padding: 0;
}
.hll {
/* "fixes" the breakage */
width: max-content;
}
.rtd_doc_footer {
display: none;
}
.document {
width: auto;
}
.footer {
width: auto;
}
.github {
display: none;
}
ul {
margin-left: 0;
}
li > ul {
/* Matches the 30px from the "ul, ol" selector above */
margin-left: 30px;
}
}
/* misc. */
.revsys-inline {
display: none!important;
}
/* Hide ugly table cell borders in ..bibliography:: directive output */
table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
border: none;
/* Below needed in some edge cases; if not applied, bottom shadows appear */
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
/* relbar */
.related {
line-height: 30px;
width: 100%;
font-size: 0.9rem;
}
.related.top {
border-bottom: 1px solid {{ theme_relbar_border }};
margin-bottom: 20px;
}
.related.bottom {
border-top: 1px solid {{ theme_relbar_border }};
}
.related ul {
padding: 0;
margin: 0;
list-style: none;
}
.related li {
display: inline;
}
nav#rellinks {
float: right;
}
nav#rellinks li+li:before {
content: "|";
}
nav#breadcrumbs li+li:before {
content: "\00BB";
}
/* Hide certain items when printing */
@media print {
div.related {
display: none;
}
}
img.github {
position: absolute;
top: 0;
border: 0;
right: 0;
}

View File

@@ -0,0 +1 @@
/* This file intentionally left blank. */

View File

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 250 250" fill="#fff">
<path d="M0 0l115 115h15l12 27 108 108V0z" fill="#151513"/>
<path d="M128 109c-15-9-9-19-9-19 3-7 2-11 2-11-1-7 3-2 3-2 4 5 2 11 2 11-3 10 5 15 9 16"/>
<path d="M115 115s4 2 5 0l14-14c3-2 6-3 8-3-8-11-15-24 2-41 5-5 10-7 16-7 1-2 3-7 12-11 0 0 5 3 7 16 4 2 8 5 12 9s7 8 9 12c14 3 17 7 17 7-4 8-9 11-11 11 0 6-2 11-7 16-16 16-30 10-41 2 0 3-1 7-5 11l-12 11c-1 1 1 5 1 5z"/>
</svg>

After

Width:  |  Height:  |  Size: 490 B

View File

@@ -0,0 +1,89 @@
from pygments.style import Style
from pygments.token import (
Comment,
Error,
Generic,
Keyword,
Literal,
Name,
Number,
Operator,
Other,
Punctuation,
String,
Whitespace,
)
# Originally based on FlaskyStyle which was based on 'tango'.
class Alabaster(Style):
background_color = "#f8f8f8" # doesn't seem to override CSS 'pre' styling?
default_style = ""
styles = {
# No corresponding class for the following:
# Text: "", # class: ''
Whitespace: "#f8f8f8", # class: 'w'
Error: "#a40000 border:#ef2929", # class: 'err'
Other: "#000000", # class 'x'
Comment: "italic #8f5902", # class: 'c'
Comment.Preproc: "noitalic", # class: 'cp'
Keyword: "bold #004461", # class: 'k'
Keyword.Constant: "bold #004461", # class: 'kc'
Keyword.Declaration: "bold #004461", # class: 'kd'
Keyword.Namespace: "bold #004461", # class: 'kn'
Keyword.Pseudo: "bold #004461", # class: 'kp'
Keyword.Reserved: "bold #004461", # class: 'kr'
Keyword.Type: "bold #004461", # class: 'kt'
Operator: "#582800", # class: 'o'
Operator.Word: "bold #004461", # class: 'ow' - like keywords
Punctuation: "bold #000000", # class: 'p'
# because special names such as Name.Class, Name.Function, etc.
# are not recognized as such later in the parsing, we choose them
# to look the same as ordinary variables.
Name: "#000000", # class: 'n'
Name.Attribute: "#c4a000", # class: 'na' - to be revised
Name.Builtin: "#004461", # class: 'nb'
Name.Builtin.Pseudo: "#3465a4", # class: 'bp'
Name.Class: "#000000", # class: 'nc' - to be revised
Name.Constant: "#000000", # class: 'no' - to be revised
Name.Decorator: "#888", # class: 'nd' - to be revised
Name.Entity: "#ce5c00", # class: 'ni'
Name.Exception: "bold #cc0000", # class: 'ne'
Name.Function: "#000000", # class: 'nf'
Name.Property: "#000000", # class: 'py'
Name.Label: "#f57900", # class: 'nl'
Name.Namespace: "#000000", # class: 'nn' - to be revised
Name.Other: "#000000", # class: 'nx'
Name.Tag: "bold #004461", # class: 'nt' - like a keyword
Name.Variable: "#000000", # class: 'nv' - to be revised
Name.Variable.Class: "#000000", # class: 'vc' - to be revised
Name.Variable.Global: "#000000", # class: 'vg' - to be revised
Name.Variable.Instance: "#000000", # class: 'vi' - to be revised
Number: "#990000", # class: 'm'
Literal: "#000000", # class: 'l'
Literal.Date: "#000000", # class: 'ld'
String: "#4e9a06", # class: 's'
String.Backtick: "#4e9a06", # class: 'sb'
String.Char: "#4e9a06", # class: 'sc'
String.Doc: "italic #8f5902", # class: 'sd' - like a comment
String.Double: "#4e9a06", # class: 's2'
String.Escape: "#4e9a06", # class: 'se'
String.Heredoc: "#4e9a06", # class: 'sh'
String.Interpol: "#4e9a06", # class: 'si'
String.Other: "#4e9a06", # class: 'sx'
String.Regex: "#4e9a06", # class: 'sr'
String.Single: "#4e9a06", # class: 's1'
String.Symbol: "#4e9a06", # class: 'ss'
Generic: "#000000", # class: 'g'
Generic.Deleted: "#a40000", # class: 'gd'
Generic.Emph: "italic #000000", # class: 'ge'
Generic.Error: "#ef2929", # class: 'gr'
Generic.Heading: "bold #000080", # class: 'gh'
Generic.Inserted: "#00A000", # class: 'gi'
Generic.Output: "#888", # class: 'go'
Generic.Prompt: "#745334", # class: 'gp'
Generic.Strong: "bold #000000", # class: 'gs'
Generic.Subheading: "bold #800080", # class: 'gu'
Generic.Traceback: "bold #a40000", # class: 'gt'
}

View File

@@ -0,0 +1,132 @@
[theme]
inherit = basic
stylesheet = basic.css, alabaster.css
sidebars = about.html, searchfield.html, navigation.html, relations.html, donate.html
pygments_style = alabaster.support.Alabaster
[options]
body_min_width = inherit
analytics_id =
badge_branch = master
canonical_url =
codecov_button = false
description =
description_font_style = normal
donate_url =
extra_nav_links =
fixed_sidebar = false
github_banner = false
github_button = true
github_count = true
github_repo =
github_type = watch
github_user =
gittip_user =
gratipay_user =
logo =
logo_name = false
logo_text_align = left
opencollective =
opencollective_button_color = white
page_width = 940px
relbar_border =
show_powered_by = true
show_related = false
show_relbar_bottom =
show_relbar_top =
show_relbars = false
sidebar_collapse = true
sidebar_includehidden = true
sidebar_width = 220px
tidelift_url =
touch_icon =
travis_button = false
gray_1 = #444
gray_2 = #EEE
gray_3 = #AAA
pink_1 = #FCC
pink_2 = #FAA
pink_3 = #D52C2C
base_bg = #fff
base_text = #000
hr_border = #B1B4B6
body_bg =
body_text = #3E4349
body_text_align = left
footer_text = #888
link = #004B6B
link_hover = #6D4100
sidebar_header =
sidebar_text = #555
sidebar_link =
sidebar_link_underscore = #999
sidebar_search_button = #CCC
sidebar_list = #000
sidebar_hr =
anchor = #DDD
anchor_hover_fg =
anchor_hover_bg = #EAEAEA
table_border = #888
shadow =
# Admonition options
## basic level
admonition_bg =
admonition_border = #CCC
note_bg =
note_border = #CCC
seealso_bg =
seealso_border = #CCC
## critical level
danger_bg =
danger_border =
danger_shadow =
error_bg =
error_border =
error_shadow =
## normal level
tip_bg =
tip_border = #CCC
hint_bg =
hint_border = #CCC
important_bg =
important_border = #CCC
## warning level
caution_bg =
caution_border =
attention_bg =
attention_border =
warn_bg =
warn_border =
topic_bg =
code_highlight_bg =
highlight_bg = #FAF3E8
xref_border = #fff
xref_bg = #FBFBFB
admonition_xref_border = #fafafa
admonition_xref_bg =
footnote_bg = #FDFDFD
footnote_border =
pre_bg =
narrow_sidebar_bg = #333
narrow_sidebar_fg = #FFF
narrow_sidebar_link =
font_size = 17px
caption_font_size = inherit
viewcode_target_bg = #ffd
code_bg = #ecf0f3
code_text = #222
code_hover = #EEE
code_font_size = 0.9em
code_font_family = 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace
font_family = Georgia, serif
head_font_family =
caption_font_family = inherit
code_highlight = #FFC

View File

@@ -0,0 +1,27 @@
Copyright (c) 2013-2025 by the Babel Team, see AUTHORS for more information.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,54 @@
Metadata-Version: 2.2
Name: babel
Version: 2.17.0
Summary: Internationalization utilities
Home-page: https://babel.pocoo.org/
Author: Armin Ronacher
Author-email: armin.ronacher@active-4.com
Maintainer: Aarni Koskela
Maintainer-email: akx@iki.fi
License: BSD-3-Clause
Project-URL: Source, https://github.com/python-babel/babel
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
License-File: LICENSE
Requires-Dist: pytz>=2015.7; python_version < "3.9"
Provides-Extra: dev
Requires-Dist: tzdata; sys_platform == "win32" and extra == "dev"
Requires-Dist: backports.zoneinfo; python_version < "3.9" and extra == "dev"
Requires-Dist: freezegun~=1.0; extra == "dev"
Requires-Dist: jinja2>=3.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytz; extra == "dev"
Requires-Dist: setuptools; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary
A collection of tools for internationalizing Python applications.

View File

@@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: setuptools (75.8.0)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -0,0 +1,20 @@
[babel.checkers]
num_plurals = babel.messages.checkers:num_plurals
python_format = babel.messages.checkers:python_format
[babel.extractors]
ignore = babel.messages.extract:extract_nothing
javascript = babel.messages.extract:extract_javascript
python = babel.messages.extract:extract_python
[console_scripts]
pybabel = babel.messages.frontend:main
[distutils.commands]
compile_catalog = babel.messages.setuptools_frontend:compile_catalog
extract_messages = babel.messages.setuptools_frontend:extract_messages
init_catalog = babel.messages.setuptools_frontend:init_catalog
update_catalog = babel.messages.setuptools_frontend:update_catalog
[distutils.setup_keywords]
message_extractors = babel.messages.setuptools_frontend:check_message_extractors

View File

@@ -0,0 +1,38 @@
"""
babel
~~~~~
Integrated collection of utilities that assist in internationalizing and
localizing applications.
This package is basically composed of two major parts:
* tools to build and work with ``gettext`` message catalogs
* a Python interface to the CLDR (Common Locale Data Repository), providing
access to various locale display names, localized number and date
formatting, etc.
:copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from babel.core import (
Locale,
UnknownLocaleError,
default_locale,
get_locale_identifier,
negotiate_locale,
parse_locale,
)
__version__ = '2.17.0'
__all__ = [
'Locale',
'UnknownLocaleError',
'__version__',
'default_locale',
'get_locale_identifier',
'negotiate_locale',
'parse_locale',
]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,72 @@
from __future__ import annotations
from babel.core import get_global
def get_official_languages(territory: str, regional: bool = False, de_facto: bool = False) -> tuple[str, ...]:
"""
Get the official language(s) for the given territory.
The language codes, if any are known, are returned in order of descending popularity.
If the `regional` flag is set, then languages which are regionally official are also returned.
If the `de_facto` flag is set, then languages which are "de facto" official are also returned.
.. warning:: Note that the data is as up to date as the current version of the CLDR used
by Babel. If you need scientifically accurate information, use another source!
:param territory: Territory code
:type territory: str
:param regional: Whether to return regionally official languages too
:type regional: bool
:param de_facto: Whether to return de-facto official languages too
:type de_facto: bool
:return: Tuple of language codes
:rtype: tuple[str]
"""
territory = str(territory).upper()
allowed_stati = {"official"}
if regional:
allowed_stati.add("official_regional")
if de_facto:
allowed_stati.add("de_facto_official")
languages = get_global("territory_languages").get(territory, {})
pairs = [
(info['population_percent'], language)
for language, info in languages.items()
if info.get('official_status') in allowed_stati
]
pairs.sort(reverse=True)
return tuple(lang for _, lang in pairs)
def get_territory_language_info(territory: str) -> dict[str, dict[str, float | str | None]]:
"""
Get a dictionary of language information for a territory.
The dictionary is keyed by language code; the values are dicts with more information.
The following keys are currently known for the values:
* `population_percent`: The percentage of the territory's population speaking the
language.
* `official_status`: An optional string describing the officiality status of the language.
Known values are "official", "official_regional" and "de_facto_official".
.. warning:: Note that the data is as up to date as the current version of the CLDR used
by Babel. If you need scientifically accurate information, use another source!
.. note:: Note that the format of the dict returned may change between Babel versions.
See https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html
:param territory: Territory code
:type territory: str
:return: Language information dictionary
:rtype: dict[str, dict]
"""
territory = str(territory).upper()
return get_global("territory_languages").get(territory, {}).copy()

View File

@@ -0,0 +1,132 @@
"""
babel.lists
~~~~~~~~~~~
Locale dependent formatting of lists.
The default locale for the functions in this module is determined by the
following environment variables, in that order:
* ``LC_ALL``, and
* ``LANG``
:copyright: (c) 2015-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
"""
from __future__ import annotations
import warnings
from collections.abc import Sequence
from typing import Literal
from babel.core import Locale, default_locale
_DEFAULT_LOCALE = default_locale() # TODO(3.0): Remove this.
def __getattr__(name):
if name == "DEFAULT_LOCALE":
warnings.warn(
"The babel.lists.DEFAULT_LOCALE constant is deprecated and will be removed.",
DeprecationWarning,
stacklevel=2,
)
return _DEFAULT_LOCALE
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
def format_list(
lst: Sequence[str],
style: Literal['standard', 'standard-short', 'or', 'or-short', 'unit', 'unit-short', 'unit-narrow'] = 'standard',
locale: Locale | str | None = None,
) -> str:
"""
Format the items in `lst` as a list.
>>> format_list(['apples', 'oranges', 'pears'], locale='en')
u'apples, oranges, and pears'
>>> format_list(['apples', 'oranges', 'pears'], locale='zh')
u'apples\u3001oranges\u548cpears'
>>> format_list(['omena', 'peruna', 'aplari'], style='or', locale='fi')
u'omena, peruna tai aplari'
Not all styles are necessarily available in all locales.
The function will attempt to fall back to replacement styles according to the rules
set forth in the CLDR root XML file, and raise a ValueError if no suitable replacement
can be found.
The following text is verbatim from the Unicode TR35-49 spec [1].
* standard:
A typical 'and' list for arbitrary placeholders.
eg. "January, February, and March"
* standard-short:
A short version of an 'and' list, suitable for use with short or abbreviated placeholder values.
eg. "Jan., Feb., and Mar."
* or:
A typical 'or' list for arbitrary placeholders.
eg. "January, February, or March"
* or-short:
A short version of an 'or' list.
eg. "Jan., Feb., or Mar."
* unit:
A list suitable for wide units.
eg. "3 feet, 7 inches"
* unit-short:
A list suitable for short units
eg. "3 ft, 7 in"
* unit-narrow:
A list suitable for narrow units, where space on the screen is very limited.
eg. "3 7″"
[1]: https://www.unicode.org/reports/tr35/tr35-49/tr35-general.html#ListPatterns
:param lst: a sequence of items to format in to a list
:param style: the style to format the list with. See above for description.
:param locale: the locale. Defaults to the system locale.
"""
locale = Locale.parse(locale or _DEFAULT_LOCALE)
if not lst:
return ''
if len(lst) == 1:
return lst[0]
patterns = _resolve_list_style(locale, style)
if len(lst) == 2 and '2' in patterns:
return patterns['2'].format(*lst)
result = patterns['start'].format(lst[0], lst[1])
for elem in lst[2:-1]:
result = patterns['middle'].format(result, elem)
result = patterns['end'].format(result, lst[-1])
return result
# Based on CLDR 45's root.xml file's `<alias>`es.
# The root file defines both `standard` and `or`,
# so they're always available.
# TODO: It would likely be better to use the
# babel.localedata.Alias mechanism for this,
# but I'm not quite sure how it's supposed to
# work with inheritance and data in the root.
_style_fallbacks = {
"or-narrow": ["or-short", "or"],
"or-short": ["or"],
"standard-narrow": ["standard-short", "standard"],
"standard-short": ["standard"],
"unit": ["unit-short", "standard"],
"unit-narrow": ["unit-short", "unit", "standard"],
"unit-short": ["standard"],
}
def _resolve_list_style(locale: Locale, style: str):
for style in (style, *(_style_fallbacks.get(style, []))): # noqa: B020
if style in locale.list_patterns:
return locale.list_patterns[style]
raise ValueError(
f"Locale {locale} does not support list formatting style {style!r} "
f"(supported are {sorted(locale.list_patterns)})",
)

View File

@@ -0,0 +1,41 @@
UNICODE LICENSE V3
COPYRIGHT AND PERMISSION NOTICE
Copyright © 2004-2025 Unicode, Inc.
NOTICE TO USER: Carefully read the following legal agreement. BY
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a
copy of data files and any associated documentation (the "Data Files") or
software and any associated documentation (the "Software") to deal in the
Data Files or Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, and/or sell
copies of the Data Files or Software, and to permit persons to whom the
Data Files or Software are furnished to do so, provided that either (a)
this copyright and permission notice appear with all copies of the Data
Files or Software, or (b) this copyright and permission notice appear in
associated Documentation.
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
FILES OR SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall
not be used in advertising or otherwise to promote the sale, use or other
dealings in these Data Files or Software without prior written
authorization of the copyright holder.
SPDX-License-Identifier: Unicode-3.0

Some files were not shown because too many files have changed in this diff Show More