csv to markdown table convertor.
Project description
CSVTables for Foliant
This preprocessor converts csv data to markdown tables.
Installation
$ pip install foliantcontrib.csvtables
Config
To enable the preprocessor with default options, add csvtables
to preprocessors
section in the project config:
preprocessors:
- csvtables
The preprocessor has a number of options (default values stated below):
preprocessors:
- csvtables:
delimiter: ';'
padding_symbol: ' '
paddings_number: 1
delimiter
: Delimiter of csv data.
padding_symbol
: Symbol combination that will be places around datum (reversed on the right side).
paddings_number
: Symbol combination multiplier.
Usage
You can place csv data in csvtable
tag.
<csvtable>
Header 1;Header 2;Header 3;Header 4;Header 5
Datum 1;Datum 2;Datum 3;Datum 4;Datum 5
Datum 6;Datum 7;Datum 8;Datum 9;Datum 10
</csvtable>
Or in external file.csv
.
<csvtable src="table.csv"></csvtable>
You can reassign setting for certain csv tables.
<csvtable delimiter=":" padding_symbol=" *">
Header 1:Header 2:Header 3:Header 4:Header 5
Datum 1:Datum 2:Datum 3:Datum 4:Datum 5
Datum 6:Datum 7:Datum 8:Datum 9:Datum 10
</csvtable>
Example
Usage
section will be converted to this:
You can place csv data in csvtable
tag.
| Header 1 | Header 2 | Header 3 | Header 4 | Header 5 |
|----------|----------|----------|----------|----------|
| Datum 1 | Datum 2 | Datum 3 | Datum 4 | Datum 5 |
| Datum 6 | Datum 7 | Datum 8 | Datum 9 | Datum 10 |
Or in external file.csv
.
| Header 1 | Header 2 | Header 3 | Header 4 | Header 5 |
|----------|----------|----------|----------|----------|
| Datum 1 | Datum 2 | Datum 3 | Datum 4 | Datum 5 |
| Datum 6 | Datum 7 | Datum 8 | Datum 9 | Datum 10 |
You can reassign setting for certain csv tables.
| *Header 1* | *Header 2* | *Header 3* | *Header 4* | *Header 5* |
|------------|------------|------------|------------|------------|
| *Datum 1* | *Datum 2* | *Datum 3* | *Datum 4* | *Datum 5* |
| *Datum 6* | *Datum 7* | *Datum 8* | *Datum 9* | *Datum 10* |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for foliantcontrib.csvtables-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65589c58e63a53aa6d58e612c3b101d6bd0ed20ac12c57501b2d8254df5bde35 |
|
MD5 | f79a17f959d56cd922dff603266b8213 |
|
BLAKE2b-256 | 15fdd1369581304e2d52293f05972c411a87b4417db92c6bf974bd6587e6c0d9 |
Hashes for foliantcontrib.csvtables-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04157d8a19949efece0f1f40376198ccc113d568e66f9dec130463c919f615cb |
|
MD5 | be40cbf740016b9a7f1d8b4407f9bac5 |
|
BLAKE2b-256 | e0f5b2486f47f7a518a7d391c8f7aa01b763b73d07c410a4c7649a5c7bd66491 |