| 1 |
.. rich-rst documentation master file, created by |
| 2 |
sphinx-quickstart on Mon Feb 7 21:28:35 2022. |
| 3 |
You can adapt this file completely to your liking, but it should at least |
| 4 |
contain the root `toctree` directive. |
| 5 |
|
| 6 |
rich-rst |
| 7 |
========================= |
| 8 |
|
| 9 |
.. toctree:: |
| 10 |
:maxdepth: 2 |
| 11 |
:caption: Contents: |
| 12 |
|
| 13 |
demonstration.rst |
| 14 |
documentation.rst |
| 15 |
|
| 16 |
Firstly, I'd like to thank you for using rich-rst. |
| 17 |
|
| 18 |
Installation |
| 19 |
~~~~~~~~~~~~ |
| 20 |
|
| 21 |
Run the following command to install |
| 22 |
|
| 23 |
.. code-block:: bash |
| 24 |
|
| 25 |
python -m pip install rich-rst |
| 26 |
|
| 27 |
If you want to live on the edge and install from master branch that may be unstable, run the following command. |
| 28 |
|
| 29 |
.. code-block:: bash |
| 30 |
|
| 31 |
python -m pip install "git+https://github.com/wasi-master/rich-rst" |
| 32 |
|
| 33 |
Here, you may need to replace ``python`` with ``python3`` on Linux and Mac and with ``py`` on Windows |
| 34 |
|
| 35 |
Usage |
| 36 |
~~~~~ |
| 37 |
If you want to print a RST document then you can use the following code |
| 38 |
|
| 39 |
.. code-block:: python |
| 40 |
|
| 41 |
import rich |
| 42 |
from rich_rst import RestructuredText |
| 43 |
|
| 44 |
rst_text = "Hello *World!*" |
| 45 |
|
| 46 |
rich.print(RestructuredText(rst_text, code_theme="dracula", show_errors=False)) |
| 47 |
|
| 48 |
Here rst_text is just a example and you should change it to your desired RST text. |
| 49 |
The parameters for the constructor are documented in :doc:`documentation <./documentation>` |
| 50 |
|
| 51 |
Contributing |
| 52 |
~~~~~~~~~~~~ |
| 53 |
|
| 54 |
Since the project is open source and `The source code is available on github`_ |
| 55 |
so you can easily see the repository `issues page`_ and help in that way. I |
| 56 |
am open to new pull requests and issues and will look into each and every |
| 57 |
one of them |
| 58 |
|
| 59 |
|
| 60 |
Indices and tables |
| 61 |
================== |
| 62 |
|
| 63 |
* :ref:`genindex` |
| 64 |
* :ref:`modindex` |
| 65 |
* :ref:`search` |
| 66 |
* :doc:`./documentation` |
| 67 |
* :doc:`./demonstration` |
| 68 |
|
| 69 |
|
| 70 |
.. _The source code is available on github: https://github.com/wasi-master/rich-rst |
| 71 |
.. _issues page: https://github.com/wasi-master/rich-rst/issues |