Skip to content

Commit 47c06fd

Browse files
committed
Docs revamp. Part 7
1 parent d34daa9 commit 47c06fd

File tree

22 files changed

+324
-311
lines changed

22 files changed

+324
-311
lines changed

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@
1616
<a href="https://t.me/Pyrogram">
1717
Community
1818
</a>
19-
<br>
20-
<a href="compiler/api/source/main_api.tl">
21-
<img src="https://img.shields.io/badge/schema-layer%2097-eda738.svg?longCache=true&colorA=262b30"
22-
alt="Schema Layer">
23-
</a>
24-
<a href="https://github.com/pyrogram/tgcrypto">
25-
<img src="https://img.shields.io/badge/tgcrypto-v1.1.1-eda738.svg?longCache=true&colorA=262b30"
26-
alt="TgCrypto Version">
27-
</a>
2819
</p>
2920

3021
## Pyrogram

docs/source/_images/logo.png

-13 KB
Binary file not shown.

docs/source/api/client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pyrogram Client
22
===============
33

4-
This class exposes high-level methods for an easy access to the API.
4+
This is the Client class. It exposes high-level methods for an easy access to the API.
55

66
.. code-block:: python
77
:emphasize-lines: 1-3

docs/source/api/decorators.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ of your functions.
3434
on_inline_query
3535
on_deleted_messages
3636
on_user_status
37+
on_poll
3738
on_disconnect
3839
on_raw_update
3940

@@ -42,5 +43,6 @@ of your functions.
4243
.. automethod:: pyrogram.Client.on_inline_query()
4344
.. automethod:: pyrogram.Client.on_deleted_messages()
4445
.. automethod:: pyrogram.Client.on_user_status()
46+
.. automethod:: pyrogram.Client.on_poll()
4547
.. automethod:: pyrogram.Client.on_disconnect()
4648
.. automethod:: pyrogram.Client.on_raw_update()

docs/source/conf.py

Lines changed: 38 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -1,200 +1,68 @@
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>
33
#
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.
65
#
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.
910
#
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.
1215
#
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/>.
1518

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-
#
2019
import os
2120
import sys
2221

23-
sys.path.insert(0, os.path.abspath('../..'))
22+
sys.path.insert(0, os.path.abspath("../.."))
2423

25-
# Import after sys.path.insert() to avoid issues
2624
from pyrogram import __version__
2725

2826
from pygments.styles.friendly import FriendlyStyle
2927

3028
FriendlyStyle.background_color = "#f3f2f1"
3129

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

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.
4134
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"
4538
]
4639

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

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__
7945
release = version
46+
version_rst = ".. |version| replace:: {}".format(version)
8047

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"]
9549

96-
# If true, `todo` and `todoList` produce output, else they produce nothing.
97-
todo_include_todos = False
50+
napoleon_use_rtype = False
9851

99-
# -- Options for HTML output ----------------------------------------------
52+
pygments_style = "friendly"
10053

10154
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
10458
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-
#
11559
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
17265
}
17366

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

Comments
 (0)