2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Update docs

This commit is contained in:
Dan 2019-06-06 18:25:23 +02:00
parent 6bebe2297e
commit 8151270a94
6 changed files with 14 additions and 9 deletions

View File

@ -58,7 +58,7 @@ with open(DEST / "index.rst", "w") as index:
date = datetime.strptime(
release["published_at"],
"%Y-%m-%dT%H:%M:%SZ"
).strftime("%b %d, %Y - %H:%M:%S (UTC)")
).strftime("%b %d, %Y")
body = pypandoc.convert_text(
release["body"].replace(r"\r\n", "\n"),
@ -67,12 +67,17 @@ with open(DEST / "index.rst", "w") as index:
extra_args=["--wrap=none"]
)
tarball_url = release["tarball_url"]
zipball_url = release["zipball_url"]
index.write("- :doc:`{} <{}>`\n".format(title, tag))
tags.append(tag)
with open(DEST / "{}.rst".format(tag), "w") as page:
page.write("Pyrogram " + tag + "\n" + "=" * (len(tag) + 9) + "\n\n")
page.write("--- *Released on " + str(date) + "*\n\n")
page.write("\t\tReleased on " + str(date) + "\n\n")
page.write("- :download:`Source Code (zip) <{}>`\n".format(zipball_url))
page.write("- :download:`Source Code (tar.gz) <{}>`\n\n".format(tarball_url))
page.write(name + "\n" + "-" * len(name) + "\n\n")
page.write(body + "\n\n")

View File

@ -197,7 +197,7 @@ And here's a good explanation of how, probably, the system works:
data-width="100%">
</script>
.. centered:: Join the discussion at `@PyrogramChat <https://t.me/pyrogramchat>`_
.. centered:: Join the discussion at `@Pyrogram <https://t.me/pyrogram>`_
However, you might be right, and your account was deactivated/limited without any good reason. This could happen because
of mistakes by either the automatic systems or a moderator. In such cases you can kindly email Telegram at

View File

@ -50,8 +50,8 @@ How the Documentation is Organized
----------------------------------
Contents are organized into self-contained topics and can be all accessed from the sidebar, or by following them in
order using the Next button at the end of each page. Here below you can, instead, find a list of the most relevant
pages for a quick access.
order using the :guilabel:`Next` button at the end of each page. Here below you can, instead, find a list of the most
relevant pages for a quick access.
First Steps
-----------

View File

@ -39,8 +39,8 @@ keep the session alive, Pyrogram won't ask you again to enter your phone number.
.. note::
The code above does nothing except asking for credentials and keeping the client online, hit ``CTRL+C`` now to stop
your application and keep reading.
The code above does nothing except asking for credentials and keeping the client online, hit :guilabel:`CTRL+C` now
to stop your application and keep reading.
Bot Authorization
-----------------

View File

@ -42,7 +42,7 @@ from ..object import Object
class InlineQueryResult(Object):
"""One result of an inline query.
Pyrogram currently supports results of the following 20 types:
Pyrogram currently supports results of the following types:
- :obj:`InlineQueryResultArticle`
"""

View File

@ -26,7 +26,7 @@ from ..object import Object
class InputMessageContent(Object):
"""Content of a message to be sent as a result of an inline query.
Pyrogram currently supports the following 4 types:
Pyrogram currently supports the following types:
- :obj:`InputTextMessageContent`
"""