Skip to content

Commit

Permalink
sphinx: make html
Browse files Browse the repository at this point in the history
  • Loading branch information
cvzi committed Jun 19, 2024
1 parent b946958 commit 79d1db3
Show file tree
Hide file tree
Showing 59 changed files with 13,434 additions and 16,364 deletions.
2 changes: 1 addition & 1 deletion docs/_build/html/.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: 72079bfb804b5d03c22d015164aa62fe
config: cfb8547b33b5d4b18195fb319dd20ee6
tags: 645f666f9bcd5a90fca523b33c5a78b7
6,237 changes: 6,237 additions & 0 deletions docs/_build/html/_downloads/a594682e6442254b8aa364675f6a5d7d/report.html

Large diffs are not rendered by default.

677 changes: 470 additions & 207 deletions docs/_build/html/_modules/flag.html

Large diffs are not rendered by default.

150 changes: 26 additions & 124 deletions docs/_build/html/_modules/index.html
Original file line number Diff line number Diff line change
@@ -1,198 +1,100 @@


<!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>Overview: module code &mdash; flag documentation</title>



<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />








<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />


<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->


<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" src="../_static/jquery.js"></script>
<script integrity="sha384-lSZeSIVKp9myfKbDQ3GkN/KHjUc+mzg17VKDN4Y2kUeBSJioB9QSM639vM9fuY//" src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>

<script type="text/javascript" src="../_static/js/theme.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=5929fcd5"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head>

<body class="wy-body-for-nav">


<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">

<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"> flag



<a href="../index.html" class="icon icon-home">
flag
</a>







<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>
</div>


</div>


<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">






</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<!-- Local TOC -->
<div class="local-toc"></div>


</div>

</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">


<nav class="wy-nav-top" aria-label="top navigation">

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">flag</a>

</nav>


<div class="wy-nav-content">

<div class="rst-content">



















<div role="navigation" aria-label="breadcrumbs navigation">

<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">

<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>

<li>Overview: module code</li>


<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Overview: module code</li>
<li class="wy-breadcrumbs-aside">

</li>

</ul>


<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>All modules for which code is available</h1>
<ul><li><a href="flag.html">flag</a></li>
</ul>

</div>

</div>
<footer>

<hr/>

<div role="contentinfo">
<p>

</p>
<p></p>
</div>



Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a


Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>

provided by <a href="https://readthedocs.org">Read the Docs</a>.
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>

</section>

</div>


<script type="text/javascript">
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>





</script>

</body>
</html>
85 changes: 81 additions & 4 deletions docs/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,24 @@ Functions
=========
.. currentmodule:: flag
.. autofunction:: flag
.. autofunction:: flag_safe
.. autofunction:: flagize
.. autofunction:: dflagize
.. autofunction:: flagize_subregional
.. autofunction:: dflagize_subregional
.. autofunction:: info
.. autofunction:: infos
.. autofunction:: version
.. autoclass:: Flag
:special-members: __init__
:members: flagize, dflagize, flagize_subregional, dflagize_subregional
:members: flagize, dflagize, flagize_subregional, dflagize_subregional, add_flag

Supported emojis and patterns
=============================

(List may be incomplete)
Complete list can be found :download:`here <_static/report.html>`.

The following flags are supported on all major platforms.

======== ========
Code Emoji
Expand Down Expand Up @@ -364,7 +370,7 @@ Code Emoji
Subregional flags
=================

The only widely supported subregional flags are currently: England, Scotland and Wales (as of iOS 12 and Android 9).
The only widely supported subregional flags are currently: England, Scotland and Wales (as of iOS 17 and Android 14).

============ ========
Code Emoji
Expand All @@ -379,7 +385,6 @@ Code Emoji
| If you use WhatsApp's emoji panel to select the Texas flag, WhatsApp uses 🇽🇹 i.e. `flagize(":XT:")` for Texas. This code "XT" is specified by Unicode as "excluded" meaning it is explicitly for private use and can be defined by anyone. Therefore, it is likely not displayed as the Texas flag on other platforms.
| But WhatsApp also recognizes the flag emoji tag sequence `flagize(":us-tx:", subregions=True)` and displays the same flag.

How subregional flags work
==========================

Expand Down Expand Up @@ -425,6 +430,78 @@ Together it's:
Unlike the regional indicator symbols, tags are not rendered on incompatible system, they will simply be invisible and have no width.
So, if the particular flag is not supported or if tag flags are not supported at all, the only visible character will be a black flag.

Validity and Support
====================

Unicode publishes a listing of all country codes and subregional codes that are available.
The data can be found in the CLDR downloads or in the repository at
https://github.com/unicode-org/cldr/blob/release-45/common/validity/region.xml

The module offers this data as a dictionary (roughly 6000 country codes):

.. code-block:: python
import flag
# For a single country code:
flag.info("US")
# {'id_status': 'regular', 'supported': True, 'valid': True}
# List of all country codes
flag.infos(extended=True)
# {'US': {'id_status': 'regular', 'supported': True, 'valid': True}, {'IT': {...}, ...}
The validity (dict-key ``'valid'``) is specified in the Unicode Emoji reports:
https://www.unicode.org/reports/tr51/#Flags

The module also offers information about the support of the flags (dict-key ``'supported'``). This data is
based on visual inspection on major devices and platforms.

Platforms with full-support are macOS 14, iOS 17, Android 14, Firefox 127, Telegram 10, WhatsApp 2.20.

The data disregards Windows as it does not support any flags by default.
Some third-party Windows apps like Firefox or Telegram do support flags.

Also it is disregarded that the People's Republic of China censors some
flags on some devices or on some language/region settings.

You can view the complete list of flags at :download:`here <_static/report.html>`.

Unsupported flags:
------------------

An Android, Firefox, WhatsApp and Telegram: unsupported two-letter flags are generally displayed as two (white on blue) letters, subregional flags are displayed as black flags.

On Windows two-letter codes are displayed as the letters themselves, subregional codes are displayed as a black flag.

On iOS and macOS unsupported two-letter flags are displayed as two letters with a black rectangle areound the letters, subregional codes are displayed similarly or as a black flag.

Example:
--------

.. code-block:: python
import flag
my_flags = flag.Flag(only_supported=True, only_valid=True, allow_subregions=True)
print(my_flags.flagize("Flag of the United States :US:"))
# This will show the US flag instead of :US:
print(my_flags.flagize("A invalid flag :XT:")) # :XT: is kept, as it is not supported
my_flags.flag("XY") # TRaise an error, because XY is not a valid country code
# Add the custom code XT, which is used for the Texas flag by WhatsApp
# And also the standard code US-TX which is understood by WhatsApp (but not generated)
my_flags.add_flag("XT")
my_flags.add_flag("US-TX")
# This will show the Texas flag on WhatsApp
# On other platforms, the first will show the letters 🇽🇹, the second an emmpty flag 🏴󠁵󠁳󠁴󠁸󠁿
print(my_flags.flagize("The Texas flag :XT:")) p
print(my_flags.flagize("The Texas flag :us-tx:"))
Indices and tables
==================
Expand Down
22 changes: 22 additions & 0 deletions docs/_build/html/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ a.headerlink {
visibility: hidden;
}

a:visited {
color: #551A8B;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down Expand Up @@ -670,6 +674,16 @@ dd {
margin-left: 30px;
}

.sig dd {
margin-top: 0px;
margin-bottom: 0px;
}

.sig dl {
margin-top: 0px;
margin-bottom: 0px;
}

dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
Expand Down Expand Up @@ -738,6 +752,14 @@ abbr, acronym {
cursor: help;
}

.translated {
background-color: rgba(207, 255, 207, 0.2)
}

.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}

/* -- code displays --------------------------------------------------------- */

pre {
Expand Down
Loading

0 comments on commit 79d1db3

Please sign in to comment.