🔨 Conduct the first construction
This commit is contained in:
parent
2e763ce880
commit
3738e9d5dd
4
public/.buildinfo
Normal file
4
public/.buildinfo
Normal file
@ -0,0 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 6b072f2c8f6c9bcf7e2b47064fb11e95
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
BIN
public/.doctrees/api/bound-methods/index.doctree
Normal file
BIN
public/.doctrees/api/bound-methods/index.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/bound-methods/message.delete.doctree
Normal file
BIN
public/.doctrees/api/bound-methods/message.delete.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/bound-methods/message.edit.doctree
Normal file
BIN
public/.doctrees/api/bound-methods/message.edit.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/bound-methods/message.forward_to.doctree
Normal file
BIN
public/.doctrees/api/bound-methods/message.forward_to.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/bound-methods/message.mark_read.doctree
Normal file
BIN
public/.doctrees/api/bound-methods/message.mark_read.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/bound-methods/message.pin.doctree
Normal file
BIN
public/.doctrees/api/bound-methods/message.pin.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/bound-methods/message.reply.doctree
Normal file
BIN
public/.doctrees/api/bound-methods/message.reply.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/bound-methods/message.unpin.doctree
Normal file
BIN
public/.doctrees/api/bound-methods/message.unpin.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/client.doctree
Normal file
BIN
public/.doctrees/api/client.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/handlers.doctree
Normal file
BIN
public/.doctrees/api/handlers.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/delete_messages.doctree
Normal file
BIN
public/.doctrees/api/methods/delete_messages.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/disconnect.doctree
Normal file
BIN
public/.doctrees/api/methods/disconnect.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/download_media.doctree
Normal file
BIN
public/.doctrees/api/methods/download_media.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/edit_message.doctree
Normal file
BIN
public/.doctrees/api/methods/edit_message.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/forward_messages.doctree
Normal file
BIN
public/.doctrees/api/methods/forward_messages.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/get_entity.doctree
Normal file
BIN
public/.doctrees/api/methods/get_entity.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/get_input_entity.doctree
Normal file
BIN
public/.doctrees/api/methods/get_input_entity.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/get_me.doctree
Normal file
BIN
public/.doctrees/api/methods/get_me.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/get_messages.doctree
Normal file
BIN
public/.doctrees/api/methods/get_messages.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/index.doctree
Normal file
BIN
public/.doctrees/api/methods/index.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/iter_messages.doctree
Normal file
BIN
public/.doctrees/api/methods/iter_messages.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/pin_message.doctree
Normal file
BIN
public/.doctrees/api/methods/pin_message.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/send_file.doctree
Normal file
BIN
public/.doctrees/api/methods/send_file.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/send_message.doctree
Normal file
BIN
public/.doctrees/api/methods/send_message.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/send_read_acknowledge.doctree
Normal file
BIN
public/.doctrees/api/methods/send_read_acknowledge.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/start.doctree
Normal file
BIN
public/.doctrees/api/methods/start.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/methods/unpin_message.doctree
Normal file
BIN
public/.doctrees/api/methods/unpin_message.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/types/channel.doctree
Normal file
BIN
public/.doctrees/api/types/channel.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/types/chat.doctree
Normal file
BIN
public/.doctrees/api/types/chat.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/types/index.doctree
Normal file
BIN
public/.doctrees/api/types/index.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/types/message.doctree
Normal file
BIN
public/.doctrees/api/types/message.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/api/types/user.doctree
Normal file
BIN
public/.doctrees/api/types/user.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/environment.pickle
Normal file
BIN
public/.doctrees/environment.pickle
Normal file
Binary file not shown.
BIN
public/.doctrees/faq.doctree
Normal file
BIN
public/.doctrees/faq.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/glossary.doctree
Normal file
BIN
public/.doctrees/glossary.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/index.doctree
Normal file
BIN
public/.doctrees/index.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/intro/install.doctree
Normal file
BIN
public/.doctrees/intro/install.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/intro/quickstart.doctree
Normal file
BIN
public/.doctrees/intro/quickstart.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/start/auth.doctree
Normal file
BIN
public/.doctrees/start/auth.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/start/invoking.doctree
Normal file
BIN
public/.doctrees/start/invoking.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/start/updates.doctree
Normal file
BIN
public/.doctrees/start/updates.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/support.doctree
Normal file
BIN
public/.doctrees/support.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/topics/proxy.doctree
Normal file
BIN
public/.doctrees/topics/proxy.doctree
Normal file
Binary file not shown.
BIN
public/.doctrees/topics/text-formatting.doctree
Normal file
BIN
public/.doctrees/topics/text-formatting.doctree
Normal file
Binary file not shown.
53
public/_sources/api/bound-methods/index.rst.txt
Normal file
53
public/_sources/api/bound-methods/index.rst.txt
Normal file
@ -0,0 +1,53 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
绑定方法
|
||||
=============
|
||||
|
||||
某些 Telethon 类型定义了所谓的绑定方法。绑定方法是指附加到该类实例的类的函数。
|
||||
|
||||
.. code-block:: python
|
||||
:emphasize-lines: 6
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
app = Client("my_account", api_id, api_hash)
|
||||
|
||||
async def handler(context):
|
||||
await context.reply('绑定方法。')
|
||||
|
||||
app.add_event_handler(handler, events.NewMessage(**args))
|
||||
|
||||
app.run_until_disconnected()
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
.. currentmodule:: telethon.tl.types
|
||||
|
||||
消息
|
||||
-------
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
- :meth:`~message.reply`
|
||||
- :meth:`~message.forward_to`
|
||||
- :meth:`~message.edit`
|
||||
- :meth:`~message.delete`
|
||||
- :meth:`~message.mark_read`
|
||||
- :meth:`~message.pin`
|
||||
- :meth:`~message.unpin`
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
message.reply <message.reply>
|
||||
message.forward_to <message.forward_to>
|
||||
message.edit <message.edit>
|
||||
message.delete <message.delete>
|
||||
message.mark_read <message.mark_read>
|
||||
message.pin <message.pin>
|
||||
message.unpin <message.unpin>
|
4
public/_sources/api/bound-methods/message.delete.rst.txt
Normal file
4
public/_sources/api/bound-methods/message.delete.rst.txt
Normal file
@ -0,0 +1,4 @@
|
||||
message.delete()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.tl.types.message.delete()
|
4
public/_sources/api/bound-methods/message.edit.rst.txt
Normal file
4
public/_sources/api/bound-methods/message.edit.rst.txt
Normal file
@ -0,0 +1,4 @@
|
||||
message.edit()
|
||||
================
|
||||
|
||||
.. automethod:: telethon.tl.types.message.edit()
|
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
message.forward_to()
|
||||
=======================
|
||||
|
||||
.. automethod:: telethon.tl.types.message.forward_to()
|
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
message.mark_read()
|
||||
======================
|
||||
|
||||
.. automethod:: telethon.tl.types.message.mark_read()
|
6
public/_sources/api/bound-methods/message.pin.rst.txt
Normal file
6
public/_sources/api/bound-methods/message.pin.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
message.pin()
|
||||
=================
|
||||
|
||||
.. automethod:: telethon.tl.types.message.pin()
|
6
public/_sources/api/bound-methods/message.reply.rst.txt
Normal file
6
public/_sources/api/bound-methods/message.reply.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
message.reply()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.tl.types.message.reply()
|
6
public/_sources/api/bound-methods/message.unpin.rst.txt
Normal file
6
public/_sources/api/bound-methods/message.unpin.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
message.unpin()
|
||||
===================
|
||||
|
||||
.. automethod:: telethon.tl.types.message.unpin()
|
29
public/_sources/api/client.rst.txt
Normal file
29
public/_sources/api/client.rst.txt
Normal file
@ -0,0 +1,29 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
客户端
|
||||
========
|
||||
|
||||
您已进入API参考部分,您可以在其中找到有关 Telethon 的 API 的详细信息。
|
||||
|
||||
此页面是关于 Client 类的,它公开了一些高级方法,以便更加轻松访问 API 。
|
||||
|
||||
.. code-block:: python
|
||||
:emphasize-lines: 1-3
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
app = Client("my_account", api_id, api_hash)
|
||||
|
||||
async def handler(context):
|
||||
print(context.text)
|
||||
|
||||
app.add_event_handler(handler, events.NewMessage(**args))
|
||||
|
||||
app.run_until_disconnected()
|
||||
|
||||
-----
|
||||
|
||||
详细信息
|
||||
-------------
|
||||
|
||||
.. autoclass:: telethon.Client()
|
45
public/_sources/api/handlers.rst.txt
Normal file
45
public/_sources/api/handlers.rst.txt
Normal file
@ -0,0 +1,45 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
消息更新处理器
|
||||
===============
|
||||
|
||||
Handlers 用于告诉 Telethon 处理哪种类型的消息更新。
|
||||
|
||||
.. code-block:: python
|
||||
:emphasize-lines: 8, 10
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
app = Client("my_account", api_id, api_hash)
|
||||
|
||||
async def handler(context):
|
||||
print(context.text)
|
||||
|
||||
app.add_event_handler(handler, events.NewMessage(**args))
|
||||
|
||||
app.run_until_disconnected()
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
.. currentmodule:: telethon.events
|
||||
|
||||
索引
|
||||
-----
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
- :class:`NewMessage`
|
||||
|
||||
-----
|
||||
|
||||
详细信息
|
||||
----------
|
||||
|
||||
.. Handlers
|
||||
.. autoclass:: NewMessage()
|
6
public/_sources/api/methods/delete_messages.rst.txt
Normal file
6
public/_sources/api/methods/delete_messages.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
delete_messages()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.delete_messages()
|
6
public/_sources/api/methods/disconnect.rst.txt
Normal file
6
public/_sources/api/methods/disconnect.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
disconnect()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.disconnect()
|
6
public/_sources/api/methods/download_media.rst.txt
Normal file
6
public/_sources/api/methods/download_media.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
download_media()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.download_media()
|
6
public/_sources/api/methods/edit_message.rst.txt
Normal file
6
public/_sources/api/methods/edit_message.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
edit_message()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.edit_message()
|
6
public/_sources/api/methods/forward_messages.rst.txt
Normal file
6
public/_sources/api/methods/forward_messages.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
forward_messages()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.forward_messages()
|
6
public/_sources/api/methods/get_entity.rst.txt
Normal file
6
public/_sources/api/methods/get_entity.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
get_entity()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.get_entity()
|
6
public/_sources/api/methods/get_input_entity.rst.txt
Normal file
6
public/_sources/api/methods/get_input_entity.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
get_input_entity()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.get_input_entity()
|
6
public/_sources/api/methods/get_me.rst.txt
Normal file
6
public/_sources/api/methods/get_me.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
get_me()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.get_me()
|
6
public/_sources/api/methods/get_messages.rst.txt
Normal file
6
public/_sources/api/methods/get_messages.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
get_messages()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.get_messages()
|
110
public/_sources/api/methods/index.rst.txt
Normal file
110
public/_sources/api/methods/index.rst.txt
Normal file
@ -0,0 +1,110 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
可用方法
|
||||
=================
|
||||
|
||||
此页面是关于 Telethon 方法的。这里列出的所有方法都绑定到 :class:`~telethon.Client` 类。
|
||||
|
||||
.. code-block:: python
|
||||
:emphasize-lines: 4
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
with TelegramClient('name', api_id, api_hash) as client:
|
||||
client.send_message('me', 'Hello, myself!')
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
.. currentmodule:: telethon.Client
|
||||
|
||||
基础
|
||||
---------
|
||||
|
||||
.. autosummary::
|
||||
:nosignatures:
|
||||
|
||||
start <start>
|
||||
disconnect <disconnect>
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
start <start>
|
||||
disconnect <disconnect>
|
||||
|
||||
|
||||
消息
|
||||
---------
|
||||
|
||||
.. autosummary::
|
||||
:nosignatures:
|
||||
|
||||
send_message <send_message>
|
||||
edit_message <edit_message>
|
||||
delete_messages <delete_messages>
|
||||
forward_messages <forward_messages>
|
||||
iter_messages <iter_messages>
|
||||
get_messages <get_messages>
|
||||
pin_message <pin_message>
|
||||
unpin_message <unpin_message>
|
||||
send_read_acknowledge <send_read_acknowledge>
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
send_message <send_message>
|
||||
edit_message <edit_message>
|
||||
delete_messages <delete_messages>
|
||||
forward_messages <forward_messages>
|
||||
iter_messages <iter_messages>
|
||||
get_messages <get_messages>
|
||||
pin_message <pin_message>
|
||||
unpin_message <unpin_message>
|
||||
send_read_acknowledge <send_read_acknowledge>
|
||||
|
||||
上传
|
||||
---------
|
||||
|
||||
.. autosummary::
|
||||
:nosignatures:
|
||||
|
||||
send_file <send_file>
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
send_file <send_file>
|
||||
|
||||
下载
|
||||
---------
|
||||
|
||||
.. autosummary::
|
||||
:nosignatures:
|
||||
|
||||
download_media <download_media>
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
download_media <download_media>
|
||||
|
||||
用户
|
||||
---------
|
||||
|
||||
.. autosummary::
|
||||
:nosignatures:
|
||||
|
||||
get_me <get_me>
|
||||
get_entity <get_entity>
|
||||
get_input_entity <get_input_entity>
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
get_me <get_me>
|
||||
get_entity <get_entity>
|
||||
get_input_entity <get_input_entity>
|
6
public/_sources/api/methods/iter_messages.rst.txt
Normal file
6
public/_sources/api/methods/iter_messages.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
iter_messages()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.iter_messages()
|
6
public/_sources/api/methods/pin_message.rst.txt
Normal file
6
public/_sources/api/methods/pin_message.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
pin_message()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.pin_message()
|
6
public/_sources/api/methods/send_file.rst.txt
Normal file
6
public/_sources/api/methods/send_file.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
send_file()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.send_file()
|
6
public/_sources/api/methods/send_message.rst.txt
Normal file
6
public/_sources/api/methods/send_message.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
send_message()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.send_message()
|
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
send_read_acknowledge()
|
||||
========================
|
||||
|
||||
.. automethod:: telethon.Client.send_read_acknowledge()
|
6
public/_sources/api/methods/start.rst.txt
Normal file
6
public/_sources/api/methods/start.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
start()
|
||||
=======
|
||||
|
||||
.. automethod:: telethon.Client.start()
|
6
public/_sources/api/methods/unpin_message.rst.txt
Normal file
6
public/_sources/api/methods/unpin_message.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
unpin_message()
|
||||
==================
|
||||
|
||||
.. automethod:: telethon.Client.unpin_message()
|
6
public/_sources/api/types/channel.rst.txt
Normal file
6
public/_sources/api/types/channel.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
Channel()
|
||||
==================
|
||||
|
||||
.. autoclass:: telethon.tl.types.channel()
|
6
public/_sources/api/types/chat.rst.txt
Normal file
6
public/_sources/api/types/chat.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
Chat()
|
||||
==================
|
||||
|
||||
.. autoclass:: telethon.tl.types.chat()
|
33
public/_sources/api/types/index.rst.txt
Normal file
33
public/_sources/api/types/index.rst.txt
Normal file
@ -0,0 +1,33 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
可用类型
|
||||
=================
|
||||
|
||||
这是客户端方法或其他模块返回的对象的快速参考。
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
.. currentmodule:: telethon.tl.types
|
||||
|
||||
消息
|
||||
---------
|
||||
|
||||
.. autosummary::
|
||||
:nosignatures:
|
||||
|
||||
message <message>
|
||||
user <user>
|
||||
chat <chat>
|
||||
channel <channel>
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
message <message>
|
||||
user <user>
|
||||
chat <chat>
|
||||
channel <channel>
|
6
public/_sources/api/types/message.rst.txt
Normal file
6
public/_sources/api/types/message.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
Message()
|
||||
==================
|
||||
|
||||
.. autoclass:: telethon.tl.types.message()
|
6
public/_sources/api/types/user.rst.txt
Normal file
6
public/_sources/api/types/user.rst.txt
Normal file
@ -0,0 +1,6 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
User()
|
||||
==================
|
||||
|
||||
.. autoclass:: telethon.tl.types.user()
|
127
public/_sources/faq.rst.txt
Normal file
127
public/_sources/faq.rst.txt
Normal file
@ -0,0 +1,127 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
FAQ
|
||||
============
|
||||
|
||||
.. role:: strike
|
||||
:class: strike
|
||||
|
||||
此常见问题解答页面提供了有关 Telethon 的常见问题的答案。
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
为什么什么都不提示?
|
||||
----------------------------
|
||||
|
||||
那么它可能有错误,但你还没有启用日志记录。 要启用日志记录,请在主文件顶部添加以下代码:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import logging
|
||||
logging.basicConfig(format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s',
|
||||
level=logging.WARNING)
|
||||
|
||||
您可以将日志记录级别更改为不同的内容,从较少信息到更多信息:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
level=logging.CRITICAL # 不会显示错误(与禁用相同)
|
||||
level=logging.ERROR # 只会显示你没有处理的错误
|
||||
level=logging.WARNING # 还将显示中等严重性的消息,例如内部 Telegram 问题
|
||||
level=logging.INFO # 还将显示信息性消息,例如连接或断开连接
|
||||
level=logging.DEBUG # 将显示大量输出以帮助调试库中的问题
|
||||
|
||||
我怎样才能过滤 FloodWaitError ?
|
||||
-----------------------------------------
|
||||
|
||||
您可以通过导入 API 中的自定义错误来过滤:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from telethon import errors
|
||||
try:
|
||||
await client.send_message(chat, 'Hi')
|
||||
except errors.FloodWaitError as e:
|
||||
# e.seconds 是您被限制了多少秒才能重新调用此 API 。
|
||||
print('Flood for', e.seconds)
|
||||
|
||||
使用 Telethon 时我的帐户被删除/限制
|
||||
------------------------------------------
|
||||
|
||||
如果您出于恶意使用 Telethon ,Telegram 可能会禁止您。
|
||||
|
||||
但是,您也可能是某个限制国家/地区的一部分,例如伊朗或俄罗斯。在这种情况下,我们有一个坏消息要告诉你。
|
||||
Telegram 更有可能禁止这些号码,因为它们经常被用来向其他帐户发送垃圾消息,并且可能是通过使用这样的库。
|
||||
我们可以给您的最佳建议是不要滥用 API,例如非常快速地调用许多请求,并且建议您通过官方应用程序注册账户。
|
||||
|
||||
我们也收到了来自哈萨克斯坦和中国的报告,在那里会无法连接 Telegram 服务器。要解决这些连接问题,您应该:doc:`使用代理 <topics/proxy>`。
|
||||
|
||||
Telegram 还可能禁止虚拟 (VoIP) 电话号码,因为它们很可能被用于发送垃圾消息。
|
||||
|
||||
如果您想检查您的帐户是否受到限制,只需向 Telegram 官方 Bot ``@SpamBot`` 发送消息即可。
|
||||
您应该通过收到 ``PeerFloodError`` 之类的错误来注意到这一点,这意味着您受到限制。
|
||||
|
||||
sqlite3.OperationalError: database is locked
|
||||
---------------------------------------------------------
|
||||
|
||||
较旧的进程仍在运行并使用相同的 “session” 文件。
|
||||
|
||||
当两个或多个客户端使用同一个会话时,会出现此错误:
|
||||
|
||||
您有一个使用相同会话文件的旧进程。
|
||||
您有两个不同的脚本正在运行(交互式会话也算在内)。
|
||||
您在同一脚本中有两个客户端同时运行。
|
||||
|
||||
解决方案是,如果您需要两个客户端,请使用两个会话。如果问题仍然存在并且您使用的是 Linux,则可以使用 ``fuser my.session`` 找出锁定文件的进程。
|
||||
作为最后的手段,您可以重新启动系统。
|
||||
|
||||
event.chat or event.sender is None
|
||||
-----------------------------------------
|
||||
|
||||
Telegram 为节省带宽并不总是发送此信息。如果您需要这些信息,您应该自己获取,因为除非您需要,否则库不会做不必要的工作:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
async def handler(event):
|
||||
chat = await event.get_chat()
|
||||
sender = await event.get_sender()
|
||||
|
||||
***** Alias DC
|
||||
|
||||
感谢 `@FrayxRulez <https://t.me/tgbetachat/104921>`_ 告诉我们 Telegram DC 存在别名服务器。
|
||||
|
||||
我想将我的帐户从 DCX 迁移到 DCY 。
|
||||
---------------------------------------------
|
||||
|
||||
首次注册帐户时,由 Telegram 根据电话号码来源决定将在哪个 DC 中创建新用户。
|
||||
|
||||
尽管 `Telegram 文档 <https://core.telegram.org/api/datacenter#user-migration>`_ 说明:服务器可能会自动迁移用户,
|
||||
尽管 Telegram 本身也 `确认 <https://twitter.com/telegram/status/427131446655197184>`_ 存在此机制,但目前无法在任何情况下手动迁移您的帐户。
|
||||
仅仅是因为该功能曾经计划但尚未实施。
|
||||
|
||||
感谢 `@gabriel <https://t.me/AnotherGroup/217699>`_ 确认该功能尚未实现。
|
||||
|
||||
为什么我的客户端在超级群组中反应缓慢?
|
||||
---------------------------------------
|
||||
|
||||
此问题仅影响某些超级群组或超级群组中的某些成员。
|
||||
|
||||
由于 Telegram 内部的工作方式,您从其他成员接收和发送给其他成员的每条消息都必须通过群组创建者的 DC,在最坏的情况下,你、创建者和其他成员属于三个不同的
|
||||
DC,其他成员的消息必须从他的 DC 传递到创建者的 DC,最后到达您的 DC。这个过程将不可避免地需要时间。
|
||||
|
||||
另一个导致响应缓慢的原因是消息是 **按优先级调度** 的。 根据成员身份,一些用户比其他用户更快地接收消息,对于大而繁忙的超级群组,延迟可能会变得
|
||||
令人注意,特别是如果您属于优先级列表的低端:
|
||||
|
||||
1. 创建者。
|
||||
2. 管理员。
|
||||
3. Bots。
|
||||
4. 提及到的用户。
|
||||
5. 近期在线用户。
|
||||
6. 其他成员。
|
||||
|
||||
感谢 `@Manuel15 <https://t.me/PyrogramChat/76990>`_ 提供优先级列表
|
53
public/_sources/glossary.rst.txt
Normal file
53
public/_sources/glossary.rst.txt
Normal file
@ -0,0 +1,53 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
常见短语
|
||||
=================
|
||||
|
||||
此页面包含常见短语列表。
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
列表
|
||||
-----
|
||||
|
||||
.. glossary::
|
||||
:sorted:
|
||||
|
||||
API
|
||||
应用程序编程接口:一组方法、协议和工具,通过为开发人员提供实用的组件,使程序开发变得更容易。
|
||||
|
||||
API key
|
||||
用于向 Telegram ``验证`` 和/或 ``授权`` 特定应用程序的密码,以便其控制 API 的使用方式,例如,防止滥用 API。
|
||||
:doc:`API keys <intro/quickstart>`。
|
||||
|
||||
DC
|
||||
也称为 *数据中心* ,是一个放置大量计算机系统并一起使用以实现服务的高质量和可用性的地方。
|
||||
|
||||
RPC
|
||||
远程过程调用的首字母缩写词,即在某个远程位置(即 Telegram 服务器)而不是在您的本地机器上执行的函数。
|
||||
|
||||
RPCError
|
||||
由 RPC 引起的错误,必须返回以代替成功的结果,以便让调用者知道出现问题。
|
||||
|
||||
Bot API
|
||||
Telegram Bot API 只能使用 HTTP 作为应用层协议将普通机器人连接到 Telegram,并允许执行 Telegram API 。
|
||||
|
||||
Userbot
|
||||
也称为 *user bot* 或简称 *ubot*,是通过第三方 Telegram 库登录的用户 --- 例如
|
||||
Telethon --- 自动执行某些行为,例如发送消息或对文本命令作出反应或任何其他事件。不要与 *bot* 混淆,即由
|
||||
`@BotFather <https://t.me/botfather>`_ 创建的普通 Telegram bot 。
|
||||
|
||||
Session
|
||||
也称为 *登录会话* ,是由双方(客户端和服务器)创建和持有的严格个人数据,用于向单个帐户授予权限,而无需从头开始新的授权过程。
|
||||
|
||||
Callback
|
||||
也称为 *回调函数* ,是一个用户定义的通用函数, *可以* 注册到框架,然后在发生特定事件时由框架回调。
|
||||
|
||||
Handler
|
||||
一个环绕回调函数的对象,该函数 *实际上意味着* 要注册到框架中,然后将能够处理特定类型的事件,例如新传入的消息。
|
||||
:doc:`消息更新处理器 <start/updates>`.
|
132
public/_sources/index.rst.txt
Normal file
132
public/_sources/index.rst.txt
Normal file
@ -0,0 +1,132 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
欢迎来到 Xtaothon
|
||||
===================
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<div align="center">
|
||||
<a href="/">
|
||||
<div><img src="_static/xtaothon.png" alt="Xtaothon Logo" width="420"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<b>Telegram MTProto API Framework for Python</b>
|
||||
|
||||
<br>
|
||||
<a href="https://github.com/LonamiWebs/Telethon">
|
||||
Source Code
|
||||
</a>
|
||||
•
|
||||
<a href="https://github.com/LonamiWebs/Telethon/releases">
|
||||
Releases
|
||||
</a>
|
||||
•
|
||||
<a href="https://t.me/Telethon_CN_Chat">
|
||||
Community
|
||||
</a>
|
||||
</p>
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
with TelegramClient('name', api_id, api_hash) as client:
|
||||
client.send_message('me', 'Hello, myself!')
|
||||
print(client.download_profile_photo('me'))
|
||||
|
||||
@client.on(events.NewMessage(pattern='(?i).*Hello'))
|
||||
async def handler(event):
|
||||
await event.reply('Hey!')
|
||||
|
||||
client.run_until_disconnected()
|
||||
|
||||
Telegram 是一款十分受欢迎的简洁的即时通讯软件。**Telethon** 旨在使您能够轻松使用 `Python` 编写可以与 Telegram_ 进行交互的 Python 程序。
|
||||
|
||||
.. _Telegram: https://telegram.org
|
||||
|
||||
快速使用这篇文档
|
||||
----------------------------------
|
||||
|
||||
内容总共被分成几大独立主题,这些主题可以从侧边栏或通过页面下方的 :guilabel:`下一项` 按钮来访问。
|
||||
下方我们提供了几个常用的主题以供快速访问。
|
||||
|
||||
.. admonition :: 云服务器优惠
|
||||
:class: tip
|
||||
|
||||
如果您需要服务器来托管您的程序我们推荐使用 **NSD Cloud**. 通过
|
||||
`链接 <https://nsdcloud.net/aff.php?aff=2>`_ 注册就可以帮助 Xtaothon 。
|
||||
|
||||
出发
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. hlist::
|
||||
:columns: 2
|
||||
|
||||
- :doc:`快速开始 <intro/quickstart>`: 快速使用 Telethon 创建一个应用程序。
|
||||
- :doc:`调用方法 <start/invoking>`: 快速调用 Telethon 的内置方法来与 Telegram 交互。
|
||||
- :doc:`处理消息 <start/updates>`: 快速处理来自 Telegram 的新消息。
|
||||
|
||||
API
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. hlist::
|
||||
:columns: 2
|
||||
|
||||
- :doc:`Telethon Client <api/client>`: Client 类的详细可配置参数。
|
||||
- :doc:`内置方法 <api/methods/index>`: 可用的高级方法列表。
|
||||
- :doc:`内置类型 <api/types/index>`: 可用的高级类型列表。
|
||||
- :doc:`绑定方法 <api/bound-methods/index>`: 方便的绑定方法列表。
|
||||
|
||||
更多
|
||||
^^^^
|
||||
|
||||
.. hlist::
|
||||
:columns: 2
|
||||
|
||||
- :doc:`Telethon FAQ <faq>`: Telethon 常见问题。
|
||||
- :doc:`常见短语 <glossary>`: 一些常见短语的释意。
|
||||
- :doc:`支持 Xtaothon <support>`: 支持 Xtaothon 的方式。
|
||||
|
||||
最后更新于 |today|
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
:caption: 简介
|
||||
|
||||
intro/quickstart
|
||||
intro/install
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
:caption: 开始
|
||||
|
||||
start/auth
|
||||
start/invoking
|
||||
start/updates
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
:caption: API
|
||||
|
||||
api/client
|
||||
api/methods/index
|
||||
api/types/index
|
||||
api/bound-methods/index
|
||||
api/handlers
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
:caption: 主题指南
|
||||
|
||||
topics/proxy
|
||||
topics/text-formatting
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
:caption: 更多
|
||||
|
||||
faq
|
||||
glossary
|
||||
support
|
51
public/_sources/intro/install.rst.txt
Normal file
51
public/_sources/intro/install.rst.txt
Normal file
@ -0,0 +1,51 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
安装指南
|
||||
=============
|
||||
|
||||
**Telethon** 所需要的 Python 的版本至少为 3.5 。我们推荐您使用最新的 Python 和 pip 版本。
|
||||
|
||||
- 从 https://www.python.org/downloads/ 中下载 **Python 3** (或者使用系统包管理器)。
|
||||
- 从 https://pip.pypa.io/en/latest/installing/ 中安装 **pip** 。
|
||||
|
||||
.. important::
|
||||
|
||||
Telethon 仅支持 **Python 3.5+** 。
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
安装
|
||||
----------------
|
||||
|
||||
- 将 Telethon 安装和升级到其最新稳定版本的最简单方法是使用 **pip**:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ python3 -m pip install --upgrade telethon
|
||||
|
||||
安装开发版本
|
||||
-------------
|
||||
|
||||
如果您希望尝试新功能,则可以运行以下命令安装开发版本:
|
||||
|
||||
.. important::
|
||||
|
||||
开发版本可能会发生错误,不建议用于生产环境。
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ python3 -m pip install --upgrade https://github.com/LonamiWebs/Telethon/archive/master.zip
|
||||
|
||||
验证安装
|
||||
---------
|
||||
|
||||
要验证是否正确安装了 Telethon ,请运行以下命令:(如果没有错误显示即安装成功)
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ python3 -c "import telethon; print(telethon.__version__)"
|
44
public/_sources/intro/quickstart.rst.txt
Normal file
44
public/_sources/intro/quickstart.rst.txt
Normal file
@ -0,0 +1,44 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
快速开始
|
||||
===========
|
||||
|
||||
通过下面的步骤您就可以创建一个 Telethon 应用程序了,快开始吧!
|
||||
|
||||
安装 Telethon
|
||||
----------------------
|
||||
|
||||
1. 使用命令 ``pip3 install -U telethon`` 安装 Telethon 。
|
||||
|
||||
2. 打开网站 https://my.telegram.org/apps :doc:`申请属于您自己的 Telegram API key <../start/auth>` 。
|
||||
|
||||
3. 打开文本编辑器并粘贴以下内容:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
api_id = 12345
|
||||
api_hash = "0123456789abcdef0123456789abcdef"
|
||||
|
||||
with TelegramClient('name', api_id, api_hash) as client:
|
||||
client.send_message('me', 'Hello, myself!')
|
||||
|
||||
4. 用您在第二步生成的值替换 *api_id* 和 *api_hash* 。
|
||||
|
||||
5. 报错文件名为 ``main.py`` 。
|
||||
|
||||
6. 使用命令 ``python3 main.py`` 开始运行。
|
||||
|
||||
7. 通过控制台提示进行账户授权。
|
||||
|
||||
8. 加入我们的 `交流社区`_.
|
||||
|
||||
享受 API
|
||||
-------------
|
||||
|
||||
这只是运行 Telethon 的一个简单例子,在接下来的文档中,我们可以学习使用更加高级的方法。
|
||||
|
||||
想要继续学习吗? 你可以点击 :doc:`调用方法 <../start/invoking>` 继续学习。
|
||||
|
||||
.. _交流社区: https://t.me/Telethon_CN_Chat
|
65
public/_sources/start/auth.rst.txt
Normal file
65
public/_sources/start/auth.rst.txt
Normal file
@ -0,0 +1,65 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
授权
|
||||
=============
|
||||
|
||||
本节教程将会教会您如何使用 Telethon 登录 Bot 或者 User 。
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
API key
|
||||
------------------
|
||||
|
||||
在 :doc:`快速开始 <../intro/quickstart>` 中需要您申请属于您自己的 Telegram API key 。
|
||||
|
||||
#. 访问 https://my.telegram.org/apps 并且使用您的 Telegram 账户登录。
|
||||
#. 填写表格以注册新的 Telegram 应用程序。
|
||||
#. 完成! API key 由这两个值组成: **api_id** 和 **api_hash**.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
API key 对每个用户是唯一的,并且仅一个值就可以授权多个 User (和 bot) 通过 MTProto API 访问 Telegram 数据库。
|
||||
|
||||
登录
|
||||
------------------
|
||||
|
||||
为了使用这个 API, Telegram 要求用户通过电话号码授权。
|
||||
Telethon 将会自动处理此过程,您需要做的只是创建一个实例 :class:`~telethon.Client` 类并且定义一个 ``session_name`` (e.g.: "my_account")
|
||||
并且调用 :meth:`~telethon.Client.start` 方法:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from telethon import TelegramClient
|
||||
|
||||
client = TelegramClient('my_account', api_id, api_hash)
|
||||
|
||||
# 使用 Bot token 登录
|
||||
await client.start(bot_token='bot_token')
|
||||
|
||||
# 使用 User 账户登录
|
||||
await client.start()
|
||||
# Enter phone number: +86**********
|
||||
# Please enter the code you received: 12345
|
||||
# Please enter your password: *******
|
||||
# (You are now logged in)
|
||||
|
||||
# 使用一个 context manager 来登录 (这相当于直接调用 start()):
|
||||
with client:
|
||||
pass
|
||||
|
||||
这会创建一个交互 Shell 要求您输入 **电话号码** (包括您的 `国家代码`_) 和 **验证码**:
|
||||
|
||||
成功登录后,将创建一个名为 ``my_account.session`` 的新文件,允许 Telethon 使用您的登录的账户信息执行 API。
|
||||
重新启动应用程序时,将自动加载此文件,只要您的账户登录文件还是可用的,Telethon 将不会要求您重新登录。
|
||||
|
||||
.. important::
|
||||
|
||||
您的 ``*.session`` 文件是私密的并且必须保证安全。
|
||||
|
||||
.. _国家代码: https://en.wikipedia.org/wiki/List_of_country_calling_codes
|
93
public/_sources/start/invoking.rst.txt
Normal file
93
public/_sources/start/invoking.rst.txt
Normal file
@ -0,0 +1,93 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
调用方法
|
||||
===============
|
||||
|
||||
此时,我们已成功 :doc:`安装 Telethon <../intro/install>` 并且 :doc:`授权 <auth>` 了我们的帐户。
|
||||
是时候开始调用 API 与 Telegram 交互了!
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
基础用法
|
||||
-----------
|
||||
|
||||
使用 Telegram 进行 API 方法调用非常简单。下面是我们将逐步讲解的基本示例代码:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
app = TelegramClient("my_account", api_id, api_hash)
|
||||
|
||||
async def main():
|
||||
await client.send_message('me', 'Hello, myself!')
|
||||
|
||||
with app:
|
||||
app.loop.run_until_complete(main())
|
||||
|
||||
逐步讲解
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. 导入 Client 类:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
#. 现在实例化一个新的 Client 对象:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
app = TelegramClient("my_account", api_id, api_hash)
|
||||
|
||||
#. 定义客户端要执行的 main 函数:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
async def main():
|
||||
# 给自己发送 “Hello, myself!”
|
||||
await client.send_message('me', 'Hello, myself!')
|
||||
|
||||
#. ``with`` context manager 是启动,执行和停止客户端的快捷方式:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
with app:
|
||||
|
||||
#. 现在你可以调用 main 函数:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
app.loop.run_until_complete(main())
|
||||
|
||||
Context Manager
|
||||
---------------
|
||||
|
||||
``with`` 语句启动一个 context manager ,用作自动调用 :meth:`~telethon.Client.start`
|
||||
和 :meth:`~telethon.Client.disconnect`,这是 Telethon 正常工作所需的方法。context manager 也会优雅地停止客户端,
|
||||
即使您的代码中出现了未处理的异常时也是如此。
|
||||
|
||||
异步调用
|
||||
------------------
|
||||
|
||||
.. important::
|
||||
|
||||
请注意,Telethon 是一个异步库,因此,您应该习惯它并学习一些基本的 asyncio 。这将对您编写应用程序有很大的帮助。
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
app = TelegramClient("my_account", api_id, api_hash)
|
||||
|
||||
async def main():
|
||||
await client.send_message('me', 'Hello, myself!')
|
||||
|
||||
with app:
|
||||
app.loop.run_until_complete(main())
|
||||
|
42
public/_sources/start/updates.rst.txt
Normal file
42
public/_sources/start/updates.rst.txt
Normal file
@ -0,0 +1,42 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
处理消息
|
||||
================
|
||||
|
||||
手动调用 :doc:`API 方法 <invoking>` 非常方便,但是如何让程序在新消息到达时做出反应呢?
|
||||
此页面将告诉您 Telethon 如何处理更新以及如何在 Telethon 中处理此类事件。让我们来看看它们是如何工作的。
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
定义处理程序
|
||||
----------------
|
||||
|
||||
首先您需要在 :doc:`Handlers <../api/handlers>` 中找到需要处理的事件的处理程序。
|
||||
|
||||
每个处理程序处理特定事件。支持同一事件注册多个回调函数。
|
||||
|
||||
注册处理程序
|
||||
---------------------
|
||||
|
||||
使用 add_handler()
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
使用 :meth:`~pyrogram.client.add_handler` 方法注册新的处理程序:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from telethon.sync import TelegramClient, events
|
||||
|
||||
app = Client("my_account", api_id, api_hash)
|
||||
|
||||
async def handler(context):
|
||||
print(context.text)
|
||||
|
||||
app.add_event_handler(handler, events.NewMessage(**args))
|
||||
|
||||
app.run_until_disconnected()
|
35
public/_sources/support.rst.txt
Normal file
35
public/_sources/support.rst.txt
Normal file
@ -0,0 +1,35 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
支持 Xtaothon
|
||||
================
|
||||
|
||||
作为开发人员,您可能理解“开源”并不意味着“免费工作”。您的支持意义重大,有助于保持我们更新的动力!
|
||||
|
||||
-----
|
||||
|
||||
Star
|
||||
----
|
||||
|
||||
Xtaothon 是一个第三方免费开源文档,并且由您的爱和支持驱动!如果您喜欢该项目并发现它很有用,请在 GitHub 上给 Xtaothon 一个 `Star`_.
|
||||
|
||||
赞助
|
||||
------
|
||||
|
||||
您可以通过微信/支付宝赞助我们:
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<form action="https://afdian.net/@xtaodada" method="get" target="_top">
|
||||
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" title="Afadian Donate!" alt="Donate" />
|
||||
<img alt="" border="0" src="https://www.paypal.com/en_IT/i/scr/pixel.gif" width="1" height="1" />
|
||||
</form>
|
||||
|
||||
-----
|
||||
|
||||
云服务器优惠
|
||||
-------------
|
||||
|
||||
如果您需要服务器来托管您的程序我们推荐使用 **NSD Cloud**. 通过
|
||||
`链接 <https://nsdcloud.net/aff.php?aff=2>`_ 注册就可以帮助 Xtaothon 。
|
||||
|
||||
.. _Star on GitHub: https://github.com/Xtao-Labs/docs-all
|
40
public/_sources/topics/proxy.rst.txt
Normal file
40
public/_sources/topics/proxy.rst.txt
Normal file
@ -0,0 +1,40 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
SOCKS5 Proxy
|
||||
============
|
||||
|
||||
Telethon 支持带有或者不带有验证的代理。
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
使用
|
||||
-----
|
||||
|
||||
- 您可以使用 Client 类中的 *proxy* 参数来设置代理:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from telethon.sync import TelegramClient
|
||||
import socks
|
||||
|
||||
app = Client(
|
||||
session_name="example",
|
||||
proxy=(
|
||||
socks.SOCKS5,
|
||||
"socks.example.com",
|
||||
1080,
|
||||
username="<your_username>",
|
||||
password="<your_password>"
|
||||
)
|
||||
)
|
||||
|
||||
app.start()
|
||||
|
||||
...
|
||||
|
||||
.. note:: 如果您的代理不需要授权,您可以将 ``username`` 和 ``password`` 的值留空或者直接在参数中删除这两项。
|
137
public/_sources/topics/text-formatting.rst.txt
Normal file
137
public/_sources/topics/text-formatting.rst.txt
Normal file
@ -0,0 +1,137 @@
|
||||
:github_url: https://github.com/Xtao-Labs/docs-all
|
||||
|
||||
文本格式
|
||||
===============
|
||||
|
||||
.. role:: strike
|
||||
:class: strike
|
||||
|
||||
.. role:: underline
|
||||
:class: underline
|
||||
|
||||
.. role:: bold-underline
|
||||
:class: bold-underline
|
||||
|
||||
.. role:: strike-italic
|
||||
:class: strike-italic
|
||||
|
||||
Telethon 支持格式化消息为 Markdown 或者 HTML 。
|
||||
|
||||
.. contents:: 目录
|
||||
:backlinks: none
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
-----
|
||||
|
||||
基本样式
|
||||
------------
|
||||
|
||||
您可以在 Markdown 样式,HTML 样式之间进行选择。以下是 Telethon 目前支持的基本样式列表。
|
||||
|
||||
- **bold**
|
||||
- *italic*
|
||||
- :strike:`strike`
|
||||
- :underline:`underline`
|
||||
- `text URL <https://docs.xtaolabs.com>`_
|
||||
- `user text mention <https://t.me/mrwangzhe>`_
|
||||
- `inline fixed-width code`
|
||||
|
||||
.. note::
|
||||
|
||||
提及用户功能仅适用于您在对话中见过此用户。
|
||||
|
||||
Markdown 样式
|
||||
--------------
|
||||
|
||||
:meth:`~telethon.client.send_message` 在消息中使用以下语法:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
**bold**
|
||||
|
||||
__italic__
|
||||
|
||||
--underline--
|
||||
|
||||
~~strike~~
|
||||
|
||||
[text URL](https://docs.xtaolabs.com/)
|
||||
|
||||
[text user mention](tg://user?id=347437156)
|
||||
|
||||
`inline fixed-width code`
|
||||
|
||||
**Example**:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
app.send_message(
|
||||
"me",
|
||||
(
|
||||
"**bold**, "
|
||||
"__italic__, "
|
||||
"--underline--, "
|
||||
"~~strike~~, "
|
||||
"[mention](tg://user?id=347437156), "
|
||||
"[URL](https://docs.xtaolabs.com), "
|
||||
"`code`"
|
||||
)
|
||||
)
|
||||
|
||||
HTML 样式
|
||||
----------
|
||||
|
||||
:meth:`~telethon.client.send_message` 在消息中使用以下语法:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
<b>bold</b>, <strong>bold</strong>
|
||||
|
||||
<i>italic</i>, <em>italic</em>
|
||||
|
||||
<u>underline</u>
|
||||
|
||||
<s>strike</s>, <del>strike</del>, <strike>strike</strike>
|
||||
|
||||
<a href="http://docs.xtaolabs.com/">text URL</a>
|
||||
|
||||
<a href="tg://user?id=347437156">inline mention</a>
|
||||
|
||||
<code>inline fixed-width code</code>
|
||||
|
||||
**Example**:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
app.send_message(
|
||||
"haskell",
|
||||
(
|
||||
"<b>bold</b>, "
|
||||
"<i>italic</i>, "
|
||||
"<u>underline</u>, "
|
||||
"<s>strike</s>, "
|
||||
"<a href=\"tg://user?id=347437156\">mention</a>, "
|
||||
"<a href=\"https://docs.xtaolabs.com/\">URL</a>, "
|
||||
"<code>code</code>"
|
||||
),
|
||||
parse_mode="html"
|
||||
)
|
||||
|
||||
.. note::
|
||||
|
||||
所有不属于标签或 HTML 实体的 ``<``, ``>`` 和 ``&`` 符号必须替换为相应的 HTML 实体(
|
||||
``<`` 替换为 ``<``, ``>`` 替换为 ``>`` 和 ``&`` 替换为 ``&``)。您可以使用此代码段快速转义这些字符:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import html
|
||||
|
||||
text = "<my text>"
|
||||
text = html.escape(text)
|
||||
|
||||
print(text)
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
<my text>
|
861
public/_static/basic.css
Normal file
861
public/_static/basic.css
Normal file
@ -0,0 +1,861 @@
|
||||
/*
|
||||
* basic.css
|
||||
* ~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
/* -- main layout ----------------------------------------------------------- */
|
||||
|
||||
div.clearer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.section::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- relbar ---------------------------------------------------------------- */
|
||||
|
||||
div.related {
|
||||
width: 100%;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
div.related h3 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.related ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 10px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.related li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.related li.right {
|
||||
float: right;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* -- sidebar --------------------------------------------------------------- */
|
||||
|
||||
div.sphinxsidebarwrapper {
|
||||
padding: 10px 5px 0 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar {
|
||||
float: left;
|
||||
width: 230px;
|
||||
margin-left: -100%;
|
||||
font-size: 90%;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap : break-word;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul,
|
||||
div.sphinxsidebar ul.want-points {
|
||||
margin-left: 20px;
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar form {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar input {
|
||||
border: 1px solid #98dbcc;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox form.search {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="text"] {
|
||||
float: left;
|
||||
width: 80%;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="submit"] {
|
||||
float: left;
|
||||
width: 20%;
|
||||
border-left: none;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* -- search page ----------------------------------------------------------- */
|
||||
|
||||
ul.search {
|
||||
margin: 10px 0 0 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.search li {
|
||||
padding: 5px 0 5px 20px;
|
||||
background-image: url(file.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 7px;
|
||||
}
|
||||
|
||||
ul.search li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.search li div.context {
|
||||
color: #888;
|
||||
margin: 2px 0 0 30px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul.keywordmatches li.goodmatch a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* -- index page ------------------------------------------------------------ */
|
||||
|
||||
table.contentstable {
|
||||
width: 90%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.contentstable p.biglink {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
a.biglink {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
span.linkdescr {
|
||||
font-style: italic;
|
||||
padding-top: 5px;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* -- general index --------------------------------------------------------- */
|
||||
|
||||
table.indextable {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.indextable td {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.indextable ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
table.indextable > tbody > tr > td > ul {
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
table.indextable tr.pcap {
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
table.indextable tr.cap {
|
||||
margin-top: 10px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
img.toggler {
|
||||
margin-right: 3px;
|
||||
margin-top: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.modindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
div.genindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
/* -- domain module index --------------------------------------------------- */
|
||||
|
||||
table.modindextable td {
|
||||
padding: 2px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* -- general body styles --------------------------------------------------- */
|
||||
|
||||
div.body {
|
||||
min-width: 450px;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
div.body p, div.body dd, div.body li, div.body blockquote {
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
a.brackets:before,
|
||||
span.brackets > a:before{
|
||||
content: "[";
|
||||
}
|
||||
|
||||
a.brackets:after,
|
||||
span.brackets > a:after {
|
||||
content: "]";
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
h4:hover > a.headerlink,
|
||||
h5:hover > a.headerlink,
|
||||
h6:hover > a.headerlink,
|
||||
dt:hover > a.headerlink,
|
||||
caption:hover > a.headerlink,
|
||||
p.caption:hover > a.headerlink,
|
||||
div.code-block-caption:hover > a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
div.body p.caption {
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
div.body td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.first {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
p.rubric {
|
||||
margin-top: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
img.align-left, figure.align-left, .figure.align-left, object.align-left {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
img.align-right, figure.align-right, .figure.align-right, object.align-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
img.align-center, figure.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.align-default, figure.align-default, .figure.align-default {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-default {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* -- sidebars -------------------------------------------------------------- */
|
||||
|
||||
div.sidebar,
|
||||
aside.sidebar {
|
||||
margin: 0 0 0.5em 1em;
|
||||
border: 1px solid #ddb;
|
||||
padding: 7px;
|
||||
background-color: #ffe;
|
||||
width: 40%;
|
||||
float: right;
|
||||
clear: right;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
p.sidebar-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.admonition, div.topic, blockquote {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px;
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
|
||||
p.topic-title {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* -- admonitions ----------------------------------------------------------- */
|
||||
|
||||
div.admonition {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
div.admonition dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.admonition-title {
|
||||
margin: 0px 10px 5px 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.body p.centered {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
||||
|
||||
div.sidebar > :last-child,
|
||||
aside.sidebar > :last-child,
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sidebar::after,
|
||||
aside.sidebar::after,
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* -- tables ---------------------------------------------------------------- */
|
||||
|
||||
table.docutils {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-default {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table caption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table caption span.caption-text {
|
||||
}
|
||||
|
||||
table.docutils td, table.docutils th {
|
||||
padding: 1px 8px 1px 5px;
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.footnote td, table.footnote th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
table.citation td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
th > :first-child,
|
||||
td > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
th > :last-child,
|
||||
td > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* -- figures --------------------------------------------------------------- */
|
||||
|
||||
div.figure, figure {
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.figure p.caption, figcaption {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-number,
|
||||
figcaption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-text,
|
||||
figcaption span.caption-text {
|
||||
}
|
||||
|
||||
/* -- field list styles ----------------------------------------------------- */
|
||||
|
||||
table.field-list td, table.field-list th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.field-list ul {
|
||||
margin: 0;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.field-list p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.field-name {
|
||||
-moz-hyphens: manual;
|
||||
-ms-hyphens: manual;
|
||||
-webkit-hyphens: manual;
|
||||
hyphens: manual;
|
||||
}
|
||||
|
||||
/* -- hlist styles ---------------------------------------------------------- */
|
||||
|
||||
table.hlist {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
table.hlist td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
||||
/* -- other body styles ----------------------------------------------------- */
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha;
|
||||
}
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha;
|
||||
}
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman;
|
||||
}
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:first-child > :first-child,
|
||||
:not(li) > ul > li:first-child > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:last-child > :last-child,
|
||||
:not(li) > ul > li:last-child > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
ol.simple ol p,
|
||||
ol.simple ul p,
|
||||
ul.simple ol p,
|
||||
ul.simple ul p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple > li:not(:first-child) > p,
|
||||
ul.simple > li:not(:first-child) > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple p,
|
||||
ul.simple p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dl.footnote > dt,
|
||||
dl.citation > dt {
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
dl.footnote > dd,
|
||||
dl.citation > dd {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl.footnote > dd:after,
|
||||
dl.citation > dd:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
|
||||
dl.field-list {
|
||||
display: grid;
|
||||
grid-template-columns: fit-content(30%) auto;
|
||||
}
|
||||
|
||||
dl.field-list > dt {
|
||||
font-weight: bold;
|
||||
word-break: break-word;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
dl.field-list > dt:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
dl.field-list > dd {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 0em;
|
||||
margin-left: 0em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
dd > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
dd ul, dd table {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
dl > dd:last-child,
|
||||
dl > dd:last-child > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt:target, span.highlighted {
|
||||
background-color: #fbe54e;
|
||||
}
|
||||
|
||||
rect.highlighted {
|
||||
fill: #fbe54e;
|
||||
}
|
||||
|
||||
dl.glossary dt {
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.versionmodified {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.system-message {
|
||||
background-color: #fda;
|
||||
padding: 5px;
|
||||
border: 3px solid red;
|
||||
}
|
||||
|
||||
.footnote:target {
|
||||
background-color: #ffa;
|
||||
}
|
||||
|
||||
.line-block {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.line-block .line-block {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.guilabel, .menuselection {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.accelerator {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.classifier {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
.classifier:before {
|
||||
font-style: normal;
|
||||
margin: 0.5em;
|
||||
content: ":";
|
||||
}
|
||||
|
||||
abbr, acronym {
|
||||
border-bottom: dotted 1px;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* -- code displays --------------------------------------------------------- */
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
overflow-y: hidden; /* fixes display issues on Chrome browsers */
|
||||
}
|
||||
|
||||
pre, div[class*="highlight-"] {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
span.pre {
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
div[class*="highlight-"] {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
td.linenos pre {
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
table.highlighttable {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tbody {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tr {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
table.highlighttable td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
|
||||
table.highlighttable td.code {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.highlight .hll {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.highlight pre,
|
||||
table.highlighttable pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption + div {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption {
|
||||
margin-top: 1em;
|
||||
padding: 2px 5px;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
div.code-block-caption code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos,
|
||||
span.linenos,
|
||||
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-number {
|
||||
padding: 0.1em 0.3em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-text {
|
||||
}
|
||||
|
||||
div.literal-block-wrapper {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
code.xref, a code {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.viewcode-link {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.viewcode-back {
|
||||
float: right;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
div.viewcode-block:target {
|
||||
margin: -1px -10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
/* -- math display ---------------------------------------------------------- */
|
||||
|
||||
img.math {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.body div.math p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span.eqno {
|
||||
float: right;
|
||||
}
|
||||
|
||||
span.eqno a.headerlink {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
div.math:hover a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* -- printout stylesheet --------------------------------------------------- */
|
||||
|
||||
@media print {
|
||||
div.document,
|
||||
div.documentwrapper,
|
||||
div.bodywrapper {
|
||||
margin: 0 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.sphinxsidebar,
|
||||
div.related,
|
||||
div.footer,
|
||||
#top-link {
|
||||
display: none;
|
||||
}
|
||||
}
|
BIN
public/_static/big.png
Normal file
BIN
public/_static/big.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
7
public/_static/clipboard.min.js
vendored
Normal file
7
public/_static/clipboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
public/_static/copy-button.svg
Normal file
5
public/_static/copy-button.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#607D8B" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<rect x="8" y="8" width="12" height="12" rx="2" />
|
||||
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" />
|
||||
</svg>
|
After Width: | Height: | Size: 369 B |
67
public/_static/copybutton.css
Normal file
67
public/_static/copybutton.css
Normal file
@ -0,0 +1,67 @@
|
||||
/* Copy buttons */
|
||||
a.copybtn {
|
||||
position: absolute;
|
||||
top: .2em;
|
||||
right: .2em;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
opacity: .3;
|
||||
transition: opacity 0.5s;
|
||||
border: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
div.highlight {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
a.copybtn > img {
|
||||
vertical-align: top;
|
||||
margin: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.highlight:hover .copybtn {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* A minimal CSS-only tooltip copied from:
|
||||
* https://codepen.io/mildrenben/pen/rVBrpK
|
||||
*
|
||||
* To use, write HTML like the following:
|
||||
*
|
||||
* <p class="o-tooltip--left" data-tooltip="Hey">Short</p>
|
||||
*/
|
||||
.o-tooltip--left {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.o-tooltip--left:after {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
content: attr(data-tooltip);
|
||||
padding: 2px;
|
||||
top: 0;
|
||||
left: -.2em;
|
||||
background: grey;
|
||||
font-size: 1rem;
|
||||
color: white;
|
||||
white-space: nowrap;
|
||||
z-index: 2;
|
||||
border-radius: 2px;
|
||||
transform: translateX(-102%) translateY(0);
|
||||
transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
||||
}
|
||||
|
||||
.o-tooltip--left:hover:after {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateX(-100%) translateY(0);
|
||||
transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
||||
transition-delay: .5s;
|
||||
}
|
153
public/_static/copybutton.js
Normal file
153
public/_static/copybutton.js
Normal file
@ -0,0 +1,153 @@
|
||||
// Localization support
|
||||
const messages = {
|
||||
'en': {
|
||||
'copy': 'Copy',
|
||||
'copy_to_clipboard': 'Copy to clipboard',
|
||||
'copy_success': 'Copied!',
|
||||
'copy_failure': 'Failed to copy',
|
||||
},
|
||||
'es' : {
|
||||
'copy': 'Copiar',
|
||||
'copy_to_clipboard': 'Copiar al portapapeles',
|
||||
'copy_success': '¡Copiado!',
|
||||
'copy_failure': 'Error al copiar',
|
||||
},
|
||||
'de' : {
|
||||
'copy': 'Kopieren',
|
||||
'copy_to_clipboard': 'In die Zwischenablage kopieren',
|
||||
'copy_success': 'Kopiert!',
|
||||
'copy_failure': 'Fehler beim Kopieren',
|
||||
}
|
||||
}
|
||||
|
||||
let locale = 'en'
|
||||
if( document.documentElement.lang !== undefined
|
||||
&& messages[document.documentElement.lang] !== undefined ) {
|
||||
locale = document.documentElement.lang
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up copy/paste for code blocks
|
||||
*/
|
||||
|
||||
const runWhenDOMLoaded = cb => {
|
||||
if (document.readyState != 'loading') {
|
||||
cb()
|
||||
} else if (document.addEventListener) {
|
||||
document.addEventListener('DOMContentLoaded', cb)
|
||||
} else {
|
||||
document.attachEvent('onreadystatechange', function() {
|
||||
if (document.readyState == 'complete') cb()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const codeCellId = index => `codecell${index}`
|
||||
|
||||
// Clears selected text since ClipboardJS will select the text when copying
|
||||
const clearSelection = () => {
|
||||
if (window.getSelection) {
|
||||
window.getSelection().removeAllRanges()
|
||||
} else if (document.selection) {
|
||||
document.selection.empty()
|
||||
}
|
||||
}
|
||||
|
||||
// Changes tooltip text for two seconds, then changes it back
|
||||
const temporarilyChangeTooltip = (el, newText) => {
|
||||
const oldText = el.getAttribute('data-tooltip')
|
||||
el.setAttribute('data-tooltip', newText)
|
||||
setTimeout(() => el.setAttribute('data-tooltip', oldText), 2000)
|
||||
}
|
||||
|
||||
const addCopyButtonToCodeCells = () => {
|
||||
// If ClipboardJS hasn't loaded, wait a bit and try again. This
|
||||
// happens because we load ClipboardJS asynchronously.
|
||||
if (window.ClipboardJS === undefined) {
|
||||
setTimeout(addCopyButtonToCodeCells, 250)
|
||||
return
|
||||
}
|
||||
|
||||
// Add copybuttons to all of our code cells
|
||||
const codeCells = document.querySelectorAll('div.highlight pre')
|
||||
codeCells.forEach((codeCell, index) => {
|
||||
const id = codeCellId(index)
|
||||
codeCell.setAttribute('id', id)
|
||||
const pre_bg = getComputedStyle(codeCell).backgroundColor;
|
||||
|
||||
const clipboardButton = id =>
|
||||
`<a class="copybtn o-tooltip--left" style="background-color: ${pre_bg}" data-tooltip="${messages[locale]['copy']}" data-clipboard-target="#${id}">
|
||||
<img src="${DOCUMENTATION_OPTIONS.URL_ROOT}_static/copy-button.svg" alt="${messages[locale]['copy_to_clipboard']}">
|
||||
</a>`
|
||||
codeCell.insertAdjacentHTML('afterend', clipboardButton(id))
|
||||
})
|
||||
|
||||
function escapeRegExp(string) {
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
|
||||
// Callback when a copy button is clicked. Will be passed the node that was clicked
|
||||
// should then grab the text and replace pieces of text that shouldn't be used in output
|
||||
function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true) {
|
||||
|
||||
var regexp;
|
||||
var match;
|
||||
|
||||
// create regexp to capture prompt and remaining line
|
||||
if (isRegexp) {
|
||||
regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)')
|
||||
} else {
|
||||
regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)')
|
||||
}
|
||||
|
||||
const outputLines = [];
|
||||
var promptFound = false;
|
||||
for (const line of textContent.split('\n')) {
|
||||
match = line.match(regexp)
|
||||
if (match) {
|
||||
promptFound = true
|
||||
if (removePrompts) {
|
||||
outputLines.push(match[2])
|
||||
} else {
|
||||
outputLines.push(line)
|
||||
}
|
||||
} else {
|
||||
if (!onlyCopyPromptLines) {
|
||||
outputLines.push(line)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If no lines with the prompt were found then just use original lines
|
||||
if (promptFound) {
|
||||
textContent = outputLines.join('\n');
|
||||
}
|
||||
|
||||
// Remove a trailing newline to avoid auto-running when pasting
|
||||
if (textContent.endsWith("\n")) {
|
||||
textContent = textContent.slice(0, -1)
|
||||
}
|
||||
return textContent
|
||||
}
|
||||
|
||||
|
||||
var copyTargetText = (trigger) => {
|
||||
var target = document.querySelector(trigger.attributes['data-clipboard-target'].value);
|
||||
return formatCopyText(target.innerText, '$ ', false, true, true)
|
||||
}
|
||||
|
||||
// Initialize with a callback so we can modify the text before copy
|
||||
const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText})
|
||||
|
||||
// Update UI with error/success messages
|
||||
clipboard.on('success', event => {
|
||||
clearSelection()
|
||||
temporarilyChangeTooltip(event.trigger, messages[locale]['copy_success'])
|
||||
})
|
||||
|
||||
clipboard.on('error', event => {
|
||||
temporarilyChangeTooltip(event.trigger, messages[locale]['copy_failure'])
|
||||
})
|
||||
}
|
||||
|
||||
runWhenDOMLoaded(addCopyButtonToCodeCells)
|
47
public/_static/copybutton_funcs.js
Normal file
47
public/_static/copybutton_funcs.js
Normal file
@ -0,0 +1,47 @@
|
||||
function escapeRegExp(string) {
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
|
||||
// Callback when a copy button is clicked. Will be passed the node that was clicked
|
||||
// should then grab the text and replace pieces of text that shouldn't be used in output
|
||||
export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true) {
|
||||
|
||||
var regexp;
|
||||
var match;
|
||||
|
||||
// create regexp to capture prompt and remaining line
|
||||
if (isRegexp) {
|
||||
regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)')
|
||||
} else {
|
||||
regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)')
|
||||
}
|
||||
|
||||
const outputLines = [];
|
||||
var promptFound = false;
|
||||
for (const line of textContent.split('\n')) {
|
||||
match = line.match(regexp)
|
||||
if (match) {
|
||||
promptFound = true
|
||||
if (removePrompts) {
|
||||
outputLines.push(match[2])
|
||||
} else {
|
||||
outputLines.push(line)
|
||||
}
|
||||
} else {
|
||||
if (!onlyCopyPromptLines) {
|
||||
outputLines.push(line)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If no lines with the prompt were found then just use original lines
|
||||
if (promptFound) {
|
||||
textContent = outputLines.join('\n');
|
||||
}
|
||||
|
||||
// Remove a trailing newline to avoid auto-running when pasting
|
||||
if (textContent.endsWith("\n")) {
|
||||
textContent = textContent.slice(0, -1)
|
||||
}
|
||||
return textContent
|
||||
}
|
1
public/_static/css/badge_only.css
Normal file
1
public/_static/css/badge_only.css
Normal file
@ -0,0 +1 @@
|
||||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
BIN
public/_static/css/fonts/Inconsolata-Bold.ttf
Normal file
BIN
public/_static/css/fonts/Inconsolata-Bold.ttf
Normal file
Binary file not shown.
BIN
public/_static/css/fonts/Inconsolata-Regular.ttf
Normal file
BIN
public/_static/css/fonts/Inconsolata-Regular.ttf
Normal file
Binary file not shown.
BIN
public/_static/css/fonts/Inconsolata.ttf
Normal file
BIN
public/_static/css/fonts/Inconsolata.ttf
Normal file
Binary file not shown.
BIN
public/_static/css/fonts/Lato-Bold.ttf
Normal file
BIN
public/_static/css/fonts/Lato-Bold.ttf
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user