From 945effc4a9b0ccbb687283bc220726ab65f98368 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 1 Apr 2020 22:39:39 +0200 Subject: [PATCH] Add tabs to docs (tgcrypto.rst) --- docs/requirements.txt | 1 + docs/source/conf.py | 3 ++- docs/source/topics/tgcrypto.rst | 27 +++++++++++++++++---------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 3ebe0d49..0e754f9f 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,6 @@ sphinx sphinx_rtd_theme sphinx_copybutton +sphinx_tabs pypandoc requests \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 519a96d9..0302328d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -35,7 +35,8 @@ extensions = [ "sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx.ext.autosummary", - "sphinx_copybutton" + "sphinx_copybutton", + "sphinx_tabs.tabs" ] master_doc = "index" diff --git a/docs/source/topics/tgcrypto.rst b/docs/source/topics/tgcrypto.rst index a5d9f815..8feab86a 100644 --- a/docs/source/topics/tgcrypto.rst +++ b/docs/source/topics/tgcrypto.rst @@ -7,12 +7,6 @@ Library specifically written in C for Pyrogram [1]_ as a Python extension. TgCrypto is a replacement for the much slower PyAES and implements the crypto algorithms Telegram requires, namely **AES-IGE 256 bit** (used in MTProto v2.0) and **AES-CTR 256 bit** (used for CDN encrypted files). -.. contents:: Contents - :backlinks: none - :local: - ------ - Installation ------------ @@ -27,10 +21,23 @@ The reason about being an optional package is that TgCrypto requires some extra The errors you receive when trying to install TgCrypto are system dependent, but also descriptive enough to understand what you should do next: -- **Windows**: Install `Visual C++ 2015 Build Tools `_. -- **macOS**: A pop-up will automatically ask you to install the command line developer tools. -- **Linux**: Install a proper C compiler (``gcc``, ``clang``) and the Python header files (``python3-dev``). -- **Termux (Android)**: Install ``clang`` package. +.. tabs:: + + .. tab:: Windows + + Install `Visual C++ 2015 Build Tools `_. + + .. tab:: macOS + + A pop-up will automatically ask you to install the command line developer tools. + + .. tab:: Linux + + Install a proper C compiler (``gcc``, ``clang``) and the Python header files (``python3-dev``). + + .. tab:: Termux + + Install ``clang`` package. .. _TgCrypto: https://github.com/pyrogram/tgcrypto