File: demonstration.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 (95 lines) | stat: -rw-r--r-- 2,540 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Demonstration
=============


Some demos of how restructuredtext rendering looks.

The demos are possible because rich has the feature to save console
output to html files

Demo Files
----------

Console Output
~~~~~~~~~~~~~~

-  `directives.html <./directives.html>`__
-  `introduction.html <./introduction.html>`__
-  `rich_introduction.html <./rich_introduction.html>`__
-  `roles.html <./roles.html>`__
-  `specification.html <./specification.html>`__

Raw RST (Input)
~~~~~~~~~~~~~~~

-  `directives.rst <./directives.txt>`__
-  `introduction.rst <./introduction.txt>`__
-  `rich_introduction.rst <./rich_introduction.txt>`__
-  `roles.rst <./roles.txt>`__
-  `specification.rst <./specification.txt>`__

Parameters Used
---------------

The following command was used the generate every file except ``rich_introduction.rst``

On Windows:

.. code-block:: powershell

    rich_rst .\demo\filename.rst ^
        --save-html .\demo\filename.html ^
        --code-theme dracula ^
        --default-lexer rst  ^
        --soft-wrap ^
        --hide-errors

On Linux/Mac

.. code-block:: bash

    rich_rst ./demo/filename.rst \
        --save-html ./demo/filename.html \
        --code-theme dracula \
        --default-lexer rst  \
        --soft-wrap \
        --hide-errors

.. note:: There are aliases available for those parameters

For ``rich_introduction.rst``, The -dl parameter was set to python

Sources
-------

Original HTML
~~~~~~~~~~~~~

| ``directives.rst`` :
  https://docutils.sourceforge.io/docs/ref/rst/directives.html
| ``specification.rst`` :
  https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html
| ``introduction.rst`` :
  https://docutils.sourceforge.io/docs/ref/rst/introduction.html
| ``mathematics.rst`` :
  https://docutils.sourceforge.io/docs/ref/rst/mathematics.html
| ``roles.rst`` :
  https://docutils.sourceforge.io/docs/ref/rst/roles.html
| ``rich_introduction.rst`` :
  https://rich.readthedocs.io/en/latest/introduction.html

Original RST
~~~~~~~~~~~~

| ``directives.rst`` :
  https://docutils.sourceforge.io/docs/ref/rst/directives.txt
| ``specification.rst`` :
  https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.txt
| ``introduction.rst`` :
  https://docutils.sourceforge.io/docs/ref/rst/introduction.txt
| ``mathematics.rst`` :
  https://docutils.sourceforge.io/docs/ref/rst/mathematics.txt
| ``roles.rst`` : https://docutils.sourceforge.io/docs/ref/rst/roles.txt
| ``rich_introduction.rst`` :
  https://github.com/Textualize/rich/raw/master/docs/source/introduction.rst