Some online tool or automation plugin for sublimetext to generate sphinx RST tables

I am using sphinx for documentation.

I would like to easily generate, for example, in a CSV file or copy-paste text, as shown here: http://sphinx-doc.org/rest.html

+------------------------+------------+----------+----------+ | Header row, column 1 | Header 2 | Header 3 | Header 4 | | (header rows optional) | | | | +========================+============+==========+==========+ | body row 1, column 1 | column 2 | column 3 | column 4 | +------------------------+------------+----------+----------+ | body row 2 | ... | ... | | +------------------------+------------+----------+----------+ 

Please help me and indicate which sublimeText plugin I can use for it, or maybe some online tool exists

+6
source share
2 answers

Ok, I found something like this http://www.tablesgenerator.com/text_tables

It creates what I wanted, and you can easily import the CSV file or just copy-paste.

+7
source

Using the CSV list to define a table is possible in ReST without any additional tools (many people do not know this, though, including me until recently). You can link to a file or URL as a resource or simply provide text:

 .. csv-table:: Frozen Delights! :header: "Treat", "Quantity", "Description" :widths: 15, 10, 30 "Albatross", 2.99, "On a stick!" "Crunchy Frog", 1.49, "If we took the bones out, it wouldn't be crunchy, now would it?" "Gannet Ripple", 1.99, "On a stick!" 

Creates this table:

CSV table result in restructured text

The documentation can be found here: http://docutils.sourceforge.net/docs/ref/rst/directives.html#id4

+3
source

Source: https://habr.com/ru/post/977353/


All Articles