Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/docs/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ def get_title_list(s: str) -> list:
categories = dict(
enums="""
Enumerations
ButtonStyle
ChatAction
ChatEventAction
ChatMemberStatus
Expand Down
1 change: 1 addition & 0 deletions compiler/errors/source/400_BAD_REQUEST.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modi
FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors.
FROM_PEER_INVALID The specified from_id is invalid.
FROZEN_PARTICIPANT_MISSING The current account is [frozen](https://core.telegram.org/api/auth#frozen-accounts), and cannot access the specified peer.
FUTURE_CREATOR_NONE The future creator after leave is only applicable to supergroups.
GAME_BOT_INVALID Bots can't send another bot's game.
GENERAL_MODIFY_ICON_FORBIDDEN You can't modify the icon of the 'General' topic.
GEO_POINT_INVALID Invalid geoposition provided.
Expand Down
23 changes: 23 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
# "sphinx.ext.viewcode",
"sphinx_copybutton",
# "sphinx.ext.coverage",
"sphinx_llms_txt",
]

intersphinx_mapping = {
Expand Down Expand Up @@ -129,9 +130,31 @@

# Set canonical URL from the Read the Docs Domain
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
if not html_baseurl:
html_baseurl = "/pyrogram/"

# Tell Jinja2 templates the build is running on Read the Docs
if os.environ.get("READTHEDOCS", "") == "True":
if "html_context" not in globals():
html_context = {}
html_context["READTHEDOCS"] = True

llms_txt_filename = "llms.txt"

# Disable full documentation file
llms_txt_full_file = False

# Provide a specific, agent-friendly summary of Pyrogram
llms_txt_summary = """Pyrogram is an elegant, modern, and asynchronous MTProto API framework for Telegram in Python for users and bots.
This documentation covers the Pyrogram Client High-Level API, the Smart Plugin system, and the raw Low-Level Telegram Functions Types.
We merge changes made to few of pyrogram forks plus changes made by us to this repository. All the features are just customized feature mostly for personal use; there is no guarantee in them being stable, USE AT YOUR OWN RISK.
"""

llms_txt_title = "PyroTGFork"

# Exclude pages that just consume tokens without providing value (like indexes or search pages)
llms_txt_exclude = [
"search",
"genindex",
"modindex",
]
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ docs = [
"furo<=2023.9.10",
"sphinx-autobuild<=2021.3.14",
"sphinx-copybutton<=0.5.2",
"pygments<=2.17.2"
"pygments<=2.17.2",
"sphinx-llms-txt==0.7.1"
]

fast = [
Expand Down