File: index.rst

package info (click to toggle)
python-rich-rst 1.3.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,756 kB
  • sloc: python: 697; makefile: 17
file content (71 lines) | stat: -rw-r--r-- 1,854 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.. rich-rst documentation master file, created by
   sphinx-quickstart on Mon Feb  7 21:28:35 2022.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

rich-rst
=========================

.. toctree::
   :maxdepth: 2
   :caption: Contents:

   demonstration.rst
   documentation.rst

Firstly, I'd like to thank you for using rich-rst.

Installation
~~~~~~~~~~~~

Run the following command to install

.. code-block:: bash

   python -m pip install rich-rst

If you want to live on the edge and install from master branch that may be unstable, run the following command.

.. code-block:: bash

   python -m pip install "git+https://github.com/wasi-master/rich-rst"

Here, you may need to replace ``python`` with ``python3`` on Linux and Mac and with ``py`` on Windows

Usage
~~~~~
If you want to print a RST document then you can use the following code

.. code-block:: python

   import rich
   from rich_rst import RestructuredText

   rst_text = "Hello *World!*"

   rich.print(RestructuredText(rst_text, code_theme="dracula", show_errors=False))

Here rst_text is just a example and you should change it to your desired RST text.
The parameters for the constructor are documented in :doc:`documentation <./documentation>`

Contributing
~~~~~~~~~~~~

Since the project is open source and `The source code is available on github`_
so you can easily see the repository `issues page`_ and help in that way. I
am open to new pull requests and issues and will look into each and every
one of them


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
* :doc:`./documentation`
* :doc:`./demonstration`


.. _The source code is available on github: https://github.com/wasi-master/rich-rst
.. _issues page: https://github.com/wasi-master/rich-rst/issues