Add documentation source files · hydrogram/hydrogram@095e97a · GitHub
Skip to content

Commit 095e97a

Browse files
committed
Add documentation source files
1 parent 74788f9 commit 095e97a

16 files changed

Lines changed: 333 additions & 0 deletions

docs/Makefile

Lines changed: 20 additions & 0 deletions

docs/make.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
set SPHINXPROJ=Pyrogram
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

docs/source/_static/pyrogram.ico

16.6 KB
Binary file not shown.

docs/source/_static/pyrogram.png

13 KB
Loading

docs/source/conf.py

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
#
4+
# Pyrogram documentation build configuration file, created by
5+
# sphinx-quickstart on Fri Dec 29 11:35:55 2017.
6+
#
7+
# This file is execfile()d with the current directory set to its
8+
# containing dir.
9+
#
10+
# Note that not all possible configuration values are present in this
11+
# autogenerated file.
12+
#
13+
# All configuration values have a default; values that are commented out
14+
# serve to show the default.
15+
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+
import os
21+
import sys
22+
23+
sys.path.insert(0, os.path.abspath('../..'))
24+
25+
# Import after sys.path.insert() to avoid issues
26+
from pyrogram import __version__
27+
28+
# -- General configuration ------------------------------------------------
29+
30+
# If your documentation needs a minimal Sphinx version, state it here.
31+
#
32+
# needs_sphinx = '1.0'
33+
34+
# Add any Sphinx extension module names here, as strings. They can be
35+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36+
# ones.
37+
extensions = [
38+
'sphinx.ext.autodoc',
39+
'sphinx.ext.napoleon'
40+
]
41+
42+
# Order by source, not alphabetically
43+
autodoc_member_order = 'bysource'
44+
45+
# Add any paths that contain templates here, relative to this directory.
46+
templates_path = ['_templates']
47+
48+
# The suffix(es) of source filenames.
49+
# You can specify multiple suffix as a list of string:
50+
#
51+
# source_suffix = ['.rst', '.md']
52+
source_suffix = '.rst'
53+
54+
# The master toctree document.
55+
master_doc = 'index'
56+
57+
# General information about the project.
58+
project = 'Pyrogram'
59+
copyright = '2017, Dan Tès'
60+
author = 'Dan Tès'
61+
62+
# The version info for the project you're documenting, acts as replacement for
63+
# |version| and |release|, also used in various other places throughout the
64+
# built documents.
65+
#
66+
# The short X.Y version.
67+
version = "version " + __version__
68+
# The full version, including alpha/beta/rc tags.
69+
release = version
70+
71+
# The language for content autogenerated by Sphinx. Refer to documentation
72+
# for a list of supported languages.
73+
#
74+
# This is also used if you do content translation via gettext catalogs.
75+
# Usually you set "language" from the command line for these cases.
76+
language = None
77+
78+
# List of patterns, relative to source directory, that match files and
79+
# directories to ignore when looking for source files.
80+
# This patterns also effect to html_static_path and html_extra_path
81+
exclude_patterns = []
82+
83+
# The name of the Pygments (syntax highlighting) style to use.
84+
pygments_style = 'sphinx'
85+
86+
# If true, `todo` and `todoList` produce output, else they produce nothing.
87+
todo_include_todos = False
88+
89+
# -- Options for HTML output ----------------------------------------------
90+
91+
# The theme to use for HTML and HTML Help pages. See the documentation for
92+
# a list of builtin themes.
93+
#
94+
html_theme = 'sphinx_rtd_theme'
95+
96+
html_theme_options = {
97+
'collapse_navigation': False
98+
}
99+
100+
# Theme options are theme-specific and customize the look and feel of a theme
101+
# further. For a list of options available for each theme, see the
102+
# documentation.
103+
#
104+
# html_theme_options = {}
105+
106+
# The name of an image file (relative to this directory) to place at the top
107+
# of the sidebar.
108+
html_logo = '_static/pyrogram.png'
109+
110+
# The name of an image file (within the static path) to use as favicon of the
111+
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
112+
# pixels large.
113+
html_favicon = '_static/pyrogram.ico'
114+
115+
# Add any paths that contain custom static files (such as style sheets) here,
116+
# relative to this directory. They are copied after the builtin static files,
117+
# so a file named "default.css" will overwrite the builtin "default.css".
118+
html_static_path = ['_static']
119+
120+
# Custom sidebar templates, must be a dictionary that maps document names
121+
# to template names.
122+
#
123+
# This is required for the alabaster theme
124+
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
125+
html_sidebars = {
126+
'**': [
127+
'relations.html', # needs 'show_related': True theme option to display
128+
'searchbox.html',
129+
]
130+
}
131+
132+
# -- Options for HTMLHelp output ------------------------------------------
133+
134+
# Output file base name for HTML help builder.
135+
htmlhelp_basename = 'Pyrogramdoc'
136+
137+
# -- Options for LaTeX output ---------------------------------------------
138+
139+
latex_elements = {
140+
# The paper size ('letterpaper' or 'a4paper').
141+
#
142+
# 'papersize': 'letterpaper',
143+
144+
# The font size ('10pt', '11pt' or '12pt').
145+
#
146+
# 'pointsize': '10pt',
147+
148+
# Additional stuff for the LaTeX preamble.
149+
#
150+
# 'preamble': '',
151+
152+
# Latex figure (float) alignment
153+
#
154+
# 'figure_align': 'htbp',
155+
}
156+
157+
# Grouping the document tree into LaTeX files. List of tuples
158+
# (source start file, target name, title,
159+
# author, documentclass [howto, manual, or own class]).
160+
latex_documents = [
161+
(master_doc, 'Pyrogram.tex', 'Pyrogram Documentation',
162+
'Dan Tès', 'manual'),
163+
]
164+
165+
# -- Options for manual page output ---------------------------------------
166+
167+
# One entry per manual page. List of tuples
168+
# (source start file, name, description, authors, manual section).
169+
man_pages = [
170+
(master_doc, 'pyrogram', 'Pyrogram Documentation',
171+
[author], 1)
172+
]
173+
174+
# -- Options for Texinfo output -------------------------------------------
175+
176+
# Grouping the document tree into Texinfo files. List of tuples
177+
# (source start file, target name, title, author,
178+
# dir menu entry, description, category)
179+
texinfo_documents = [
180+
(master_doc, 'Pyrogram', 'Pyrogram Documentation',
181+
author, 'Pyrogram', 'One line description of project.',
182+
'Miscellaneous'),
183+
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
See Other
2+
=========
3+
4+
.. automodule:: pyrogram.api.errors.exceptions.see_other_303
5+
:members:
6+
:show-inheritance:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bad Request
2+
===========
3+
4+
.. automodule:: pyrogram.api.errors.exceptions.bad_request_400
5+
:members:
6+
:show-inheritance:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Unauthorized
2+
============
3+
4+
.. automodule:: pyrogram.api.errors.exceptions.unauthorized_401
5+
:members:
6+
:show-inheritance:

docs/source/errors/420_flood.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Flood
2+
=====
3+
4+
.. automodule:: pyrogram.api.errors.exceptions.flood_420
5+
:members:
6+
:show-inheritance:
Lines changed: 6 additions & 0 deletions

0 commit comments

Comments
 (0)