2020-03-21 14:43:32 +00:00
|
|
|
# Pyrogram - Telegram MTProto API Client Library for Python
|
2021-01-01 21:58:48 +00:00
|
|
|
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
|
2017-12-30 18:47:18 +00:00
|
|
|
#
|
2020-03-21 14:43:32 +00:00
|
|
|
# This file is part of Pyrogram.
|
2017-12-30 18:47:18 +00:00
|
|
|
#
|
2020-03-21 14:43:32 +00:00
|
|
|
# Pyrogram is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License as published
|
|
|
|
# by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
2017-12-30 18:47:18 +00:00
|
|
|
#
|
2020-03-21 14:43:32 +00:00
|
|
|
# Pyrogram is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License for more details.
|
2017-12-30 18:47:18 +00:00
|
|
|
#
|
2020-03-21 14:43:32 +00:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
2017-12-30 18:47:18 +00:00
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
2021-03-03 17:51:26 +00:00
|
|
|
from datetime import datetime
|
2017-12-30 18:47:18 +00:00
|
|
|
|
2019-05-23 16:59:29 +00:00
|
|
|
sys.path.insert(0, os.path.abspath("../.."))
|
2017-12-30 18:47:18 +00:00
|
|
|
|
2018-04-15 18:56:06 +00:00
|
|
|
from pyrogram import __version__
|
2017-12-30 18:47:18 +00:00
|
|
|
|
2019-04-12 13:52:06 +00:00
|
|
|
from pygments.styles.friendly import FriendlyStyle
|
|
|
|
|
|
|
|
FriendlyStyle.background_color = "#f3f2f1"
|
|
|
|
|
2019-05-23 16:59:29 +00:00
|
|
|
project = "Pyrogram"
|
2022-01-07 09:18:51 +00:00
|
|
|
copyright = f"2017-present, Dan"
|
2019-05-23 16:59:29 +00:00
|
|
|
author = "Dan"
|
2017-12-30 18:47:18 +00:00
|
|
|
|
2022-01-07 09:18:51 +00:00
|
|
|
version = ".".join(__version__.split(".")[:-1])
|
|
|
|
|
2017-12-30 18:47:18 +00:00
|
|
|
extensions = [
|
2019-05-23 16:59:29 +00:00
|
|
|
"sphinx.ext.autodoc",
|
|
|
|
"sphinx.ext.napoleon",
|
2019-10-19 14:25:32 +00:00
|
|
|
"sphinx.ext.autosummary",
|
2022-01-07 09:18:51 +00:00
|
|
|
"sphinx_copybutton"
|
2017-12-30 18:47:18 +00:00
|
|
|
]
|
|
|
|
|
2019-05-23 16:59:29 +00:00
|
|
|
master_doc = "index"
|
|
|
|
source_suffix = ".rst"
|
|
|
|
autodoc_member_order = "bysource"
|
2017-12-30 18:47:18 +00:00
|
|
|
|
2022-01-07 09:18:51 +00:00
|
|
|
templates_path = ["_resources/templates"]
|
|
|
|
html_copy_source = False
|
2017-12-30 18:47:18 +00:00
|
|
|
|
2019-05-23 16:59:29 +00:00
|
|
|
napoleon_use_rtype = False
|
2022-01-07 09:18:51 +00:00
|
|
|
napoleon_use_param = False
|
2017-12-30 18:47:18 +00:00
|
|
|
|
2019-05-23 16:59:29 +00:00
|
|
|
pygments_style = "friendly"
|
2017-12-30 18:47:18 +00:00
|
|
|
|
2020-05-02 19:17:05 +00:00
|
|
|
copybutton_prompt_text = "$ "
|
|
|
|
|
2022-01-07 09:18:51 +00:00
|
|
|
suppress_warnings = ["image.not_readable"]
|
|
|
|
|
2018-01-15 11:36:03 +00:00
|
|
|
html_title = "Pyrogram Documentation"
|
2019-05-23 16:59:29 +00:00
|
|
|
html_theme = "sphinx_rtd_theme"
|
2022-01-07 09:18:51 +00:00
|
|
|
html_static_path = ["_resources/static"]
|
2019-05-23 16:59:29 +00:00
|
|
|
html_show_sourcelink = True
|
2018-01-08 04:17:55 +00:00
|
|
|
html_show_copyright = False
|
|
|
|
html_theme_options = {
|
2019-05-23 16:59:29 +00:00
|
|
|
"canonical_url": "https://docs.pyrogram.org/",
|
|
|
|
"collapse_navigation": True,
|
2019-08-21 07:32:58 +00:00
|
|
|
"sticky_navigation": False,
|
2019-05-23 16:59:29 +00:00
|
|
|
"logo_only": True,
|
2022-01-07 09:18:51 +00:00
|
|
|
"display_version": False,
|
2019-05-28 14:41:55 +00:00
|
|
|
"style_external_links": True
|
2017-12-30 18:47:18 +00:00
|
|
|
}
|
|
|
|
|
2022-01-07 09:18:51 +00:00
|
|
|
html_logo = "_resources/static/img/pyrogram.png"
|
|
|
|
html_favicon = "_resources/static/img/favicon.ico"
|
2019-06-22 23:31:18 +00:00
|
|
|
|
|
|
|
latex_engine = "xelatex"
|
2022-01-07 09:18:51 +00:00
|
|
|
latex_logo = "_resources/static/img/pyrogram.png"
|
2019-06-22 23:31:18 +00:00
|
|
|
|
|
|
|
latex_elements = {
|
|
|
|
"pointsize": "12pt",
|
|
|
|
"fontpkg": r"""
|
2019-08-17 11:12:13 +00:00
|
|
|
\setmainfont{Open Sans}
|
|
|
|
\setsansfont{Bitter}
|
2019-06-22 23:31:18 +00:00
|
|
|
\setmonofont{Ubuntu Mono}
|
|
|
|
"""
|
|
|
|
}
|