|
1 | | -#!/usr/bin/env python3 |
2 | | -# -*- coding: utf-8 -*- |
| 1 | +# Pyrogram - Telegram MTProto API Client Library for Python |
| 2 | +# Copyright (C) 2017-2019 Dan Tès <https://github.com/delivrance> |
3 | 3 | # |
4 | | -# Pyrogram documentation build configuration file, created by |
5 | | -# sphinx-quickstart on Fri Dec 29 11:35:55 2017. |
| 4 | +# This file is part of Pyrogram. |
6 | 5 | # |
7 | | -# This file is execfile()d with the current directory set to its |
8 | | -# containing dir. |
| 6 | +# Pyrogram is free software: you can redistribute it and/or modify |
| 7 | +# it under the terms of the GNU Lesser General Public License as published |
| 8 | +# by the Free Software Foundation, either version 3 of the License, or |
| 9 | +# (at your option) any later version. |
9 | 10 | # |
10 | | -# Note that not all possible configuration values are present in this |
11 | | -# autogenerated file. |
| 11 | +# Pyrogram is distributed in the hope that it will be useful, |
| 12 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | +# GNU Lesser General Public License for more details. |
12 | 15 | # |
13 | | -# All configuration values have a default; values that are commented out |
14 | | -# serve to show the default. |
| 16 | +# You should have received a copy of the GNU Lesser General Public License |
| 17 | +# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>. |
15 | 18 |
|
16 | | -# If extensions (or modules to document with autodoc) are in another directory, |
17 | | -# add these directories to sys.path here. If the directory is relative to the |
18 | | -# documentation root, use os.path.abspath to make it absolute, like shown here. |
19 | | -# |
20 | 19 | import os |
21 | 20 | import sys |
22 | 21 |
|
23 | | -sys.path.insert(0, os.path.abspath('../..')) |
| 22 | +sys.path.insert(0, os.path.abspath("../..")) |
24 | 23 |
|
25 | | -# Import after sys.path.insert() to avoid issues |
26 | 24 | from pyrogram import __version__ |
27 | 25 |
|
28 | 26 | from pygments.styles.friendly import FriendlyStyle |
29 | 27 |
|
30 | 28 | FriendlyStyle.background_color = "#f3f2f1" |
31 | 29 |
|
32 | | -# -- General configuration ------------------------------------------------ |
33 | | - |
34 | | -# If your documentation needs a minimal Sphinx version, state it here. |
35 | | -# |
36 | | -# needs_sphinx = '1.0' |
| 30 | +project = "Pyrogram" |
| 31 | +copyright = "2017-2019, Dan" |
| 32 | +author = "Dan" |
37 | 33 |
|
38 | | -# Add any Sphinx extension module names here, as strings. They can be |
39 | | -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
40 | | -# ones. |
41 | 34 | extensions = [ |
42 | | - 'sphinx.ext.autodoc', |
43 | | - 'sphinx.ext.napoleon', |
44 | | - 'sphinx.ext.autosummary' |
| 35 | + "sphinx.ext.autodoc", |
| 36 | + "sphinx.ext.napoleon", |
| 37 | + "sphinx.ext.autosummary" |
45 | 38 | ] |
46 | 39 |
|
47 | | -napoleon_use_rtype = False |
48 | | - |
49 | | -# Don't show source files on docs |
50 | | -html_show_sourcelink = True |
51 | | - |
52 | | -# Order by source, not alphabetically |
53 | | -autodoc_member_order = 'bysource' |
54 | | - |
55 | | -# Add any paths that contain templates here, relative to this directory. |
56 | | -templates_path = ['_templates'] |
57 | | - |
58 | | -# The suffix(es) of source filenames. |
59 | | -# You can specify multiple suffix as a list of string: |
60 | | -# |
61 | | -# source_suffix = ['.rst', '.md'] |
62 | | -source_suffix = '.rst' |
63 | | - |
64 | | -# The master toctree document. |
65 | | -master_doc = 'index' |
| 40 | +master_doc = "index" |
| 41 | +source_suffix = ".rst" |
| 42 | +autodoc_member_order = "bysource" |
66 | 43 |
|
67 | | -# General information about the project. |
68 | | -project = 'Pyrogram' |
69 | | -copyright = '2017-2019, Dan Tès' |
70 | | -author = 'Dan Tès' |
71 | | - |
72 | | -# The version info for the project you're documenting, acts as replacement for |
73 | | -# |version| and |release|, also used in various other places throughout the |
74 | | -# built documents. |
75 | | -# |
76 | | -# The short X.Y version. |
77 | | -version = "version " + __version__ |
78 | | -# The full version, including alpha/beta/rc tags. |
| 44 | +version = __version__ |
79 | 45 | release = version |
| 46 | +version_rst = ".. |version| replace:: {}".format(version) |
80 | 47 |
|
81 | | -# The language for content autogenerated by Sphinx. Refer to documentation |
82 | | -# for a list of supported languages. |
83 | | -# |
84 | | -# This is also used if you do content translation via gettext catalogs. |
85 | | -# Usually you set "language" from the command line for these cases. |
86 | | -language = None |
87 | | - |
88 | | -# List of patterns, relative to source directory, that match files and |
89 | | -# directories to ignore when looking for source files. |
90 | | -# This patterns also effect to html_static_path and html_extra_path |
91 | | -exclude_patterns = [] |
92 | | - |
93 | | -# The name of the Pygments (syntax highlighting) style to use. |
94 | | -pygments_style = 'friendly' |
| 48 | +templates_path = ["_templates"] |
95 | 49 |
|
96 | | -# If true, `todo` and `todoList` produce output, else they produce nothing. |
97 | | -todo_include_todos = False |
| 50 | +napoleon_use_rtype = False |
98 | 51 |
|
99 | | -# -- Options for HTML output ---------------------------------------------- |
| 52 | +pygments_style = "friendly" |
100 | 53 |
|
101 | 54 | html_title = "Pyrogram Documentation" |
102 | | - |
103 | | -# Overridden by template |
| 55 | +html_theme = "sphinx_rtd_theme" |
| 56 | +html_static_path = ["_static"] |
| 57 | +html_show_sourcelink = True |
104 | 58 | html_show_copyright = False |
105 | | - |
106 | | -# The theme to use for HTML and HTML Help pages. See the documentation for |
107 | | -# a list of builtin themes. |
108 | | -# |
109 | | -html_theme = 'sphinx_rtd_theme' |
110 | | - |
111 | | -# Theme options are theme-specific and customize the look and feel of a theme |
112 | | -# further. For a list of options available for each theme, see the |
113 | | -# documentation. |
114 | | -# |
115 | 59 | html_theme_options = { |
116 | | - 'canonical_url': "https://docs.pyrogram.org/", |
117 | | - 'collapse_navigation': True, |
118 | | - 'sticky_navigation': False, |
119 | | - 'logo_only': True, |
120 | | - 'display_version': True |
121 | | -} |
122 | | - |
123 | | -# The name of an image file (relative to this directory) to place at the top |
124 | | -# of the sidebar. |
125 | | -html_logo = '_images/logo.png' |
126 | | - |
127 | | -# The name of an image file (within the static path) to use as favicon of the |
128 | | -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
129 | | -# pixels large. |
130 | | -html_favicon = '_images/favicon.ico' |
131 | | - |
132 | | -# Add any paths that contain custom static files (such as style sheets) here, |
133 | | -# relative to this directory. They are copied after the builtin static files, |
134 | | -# so a file named "default.css" will overwrite the builtin "default.css". |
135 | | -# html_static_path = ['_static'] |
136 | | - |
137 | | -# Custom sidebar templates, must be a dictionary that maps document names |
138 | | -# to template names. |
139 | | -# |
140 | | -# This is required for the alabaster theme |
141 | | -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars |
142 | | -html_sidebars = { |
143 | | - '**': [ |
144 | | - 'relations.html', # needs 'show_related': True theme option to display |
145 | | - 'searchbox.html', |
146 | | - ] |
147 | | -} |
148 | | - |
149 | | -# -- Options for HTMLHelp output ------------------------------------------ |
150 | | - |
151 | | -# Output file base name for HTML help builder. |
152 | | -htmlhelp_basename = 'Pyrogramdoc' |
153 | | - |
154 | | -# -- Options for LaTeX output --------------------------------------------- |
155 | | - |
156 | | -latex_elements = { |
157 | | - # The paper size ('letterpaper' or 'a4paper'). |
158 | | - # |
159 | | - # 'papersize': 'letterpaper', |
160 | | - |
161 | | - # The font size ('10pt', '11pt' or '12pt'). |
162 | | - # |
163 | | - # 'pointsize': '10pt', |
164 | | - |
165 | | - # Additional stuff for the LaTeX preamble. |
166 | | - # |
167 | | - # 'preamble': '', |
168 | | - |
169 | | - # Latex figure (float) alignment |
170 | | - # |
171 | | - # 'figure_align': 'htbp', |
| 60 | + "canonical_url": "https://docs.pyrogram.org/", |
| 61 | + "collapse_navigation": True, |
| 62 | + "sticky_navigation": False, |
| 63 | + "logo_only": True, |
| 64 | + "display_version": True |
172 | 65 | } |
173 | 66 |
|
174 | | -# Grouping the document tree into LaTeX files. List of tuples |
175 | | -# (source start file, target name, title, |
176 | | -# author, documentclass [howto, manual, or own class]). |
177 | | -latex_documents = [ |
178 | | - (master_doc, 'Pyrogram.tex', 'Pyrogram Documentation', |
179 | | - 'Dan Tès', 'manual'), |
180 | | -] |
181 | | - |
182 | | -# -- Options for manual page output --------------------------------------- |
183 | | - |
184 | | -# One entry per manual page. List of tuples |
185 | | -# (source start file, name, description, authors, manual section). |
186 | | -man_pages = [ |
187 | | - (master_doc, 'pyrogram', 'Pyrogram Documentation', |
188 | | - [author], 1) |
189 | | -] |
190 | | - |
191 | | -# -- Options for Texinfo output ------------------------------------------- |
192 | | - |
193 | | -# Grouping the document tree into Texinfo files. List of tuples |
194 | | -# (source start file, target name, title, author, |
195 | | -# dir menu entry, description, category) |
196 | | -texinfo_documents = [ |
197 | | - (master_doc, 'Pyrogram', 'Pyrogram Documentation', |
198 | | - author, 'Pyrogram', 'One line description of project.', |
199 | | - 'Miscellaneous'), |
200 | | -] |
| 67 | +html_logo = "_images/pyrogram.png" |
| 68 | +html_favicon = "_images/favicon.ico" |
0 commit comments