diff --git a/README.rst b/README.rst
index 14fc52a5..3b7f7d55 100755
--- a/README.rst
+++ b/README.rst
@@ -5,14 +5,24 @@ Telethon
⭐️ Thanks **everyone** who has starred the project, it means a lot!
**Telethon** is Telegram client implementation in **Python 3** which uses
-the latest available API of Telegram. Remember to use **pip3** to install!
+the latest available API of Telegram.
+
+
+What is this?
+-------------
+
+Telegram is a popular messaging application. This library is meant
+to make it easy for you to write Python programs that can interact
+with Telegram. Think of it as a wrapper that has already done the
+heavy job for you, so you can focus on developing an application.
+
Installing
----------
.. code:: sh
- pip install telethon
+ pip3 install telethon
Creating a client
@@ -27,14 +37,10 @@ Creating a client
# api_hash from https://my.telegram.org, under API Development.
api_id = 12345
api_hash = '0123456789abcdef0123456789abcdef'
- phone = '+34600000000'
client = TelegramClient('session_name', api_id, api_hash)
async def main():
- await client.connect()
- # Skip this if you already have a previous 'session_name.session' file
- await client.sign_in(phone_number)
- me = await client.sign_in(code=input('Code: '))
+ await client.start()
asyncio.get_event_loop().run_until_complete(main())
diff --git a/docs/docs_writer.py b/docs/docs_writer.py
index 9eec6cd7..82241a48 100644
--- a/docs/docs_writer.py
+++ b/docs/docs_writer.py
@@ -28,6 +28,7 @@ class DocsWriter:
self.table_columns = 0
self.table_columns_left = None
self.write_copy_script = False
+ self._script = ''
# High level writing
def write_head(self, title, relative_css_path):
@@ -254,6 +255,12 @@ class DocsWriter:
self.write(''
.format(text_to_copy, text))
+ def add_script(self, src='', relative_src=None):
+ if relative_src:
+ self._script += ''.format(relative_src)
+ elif src:
+ self._script += ''.format(src)
+
def end_body(self):
"""Ends the whole document. This should be called the last"""
if self.write_copy_script:
@@ -268,7 +275,9 @@ class DocsWriter:
'catch(e){}}'
'')
- self.write('