MkDocs plugin to directly insert tables from files into markdown.
Project description
mkdocs-table-reader-plugin
MkDocs plugin that enables a markdown tag like {{ read_csv('table.csv') }} to directly insert various table formats into a page.
For a workflow with other plugins see the blogpost building reproducible reports with MkDocs
Installation
Install the plugin using pip:
pip install mkdocs-table-reader-plugin
Next, add the following lines to your mkdocs.yml:
plugins:
- search
- table-reader
If you have no
pluginsentry in your config file yet, you'll likely also want to add thesearchplugin. MkDocs enables it by default if there is nopluginsentry set.
Usage
In your markdown files you can now use:
{{ read_csv('path_to_table.csv') }}
Where the path is relative to the location of your project's mkdocs.yml file, or your project's docs/ directory, or the location of your markdown source file (all 3 possible locations will be searched, in that order).
- There are readers available for many common table formats, like
.csv,.fwf,.json,.xls,.xlsx,.yaml,.featherand.tsv. There is also theread_raw()reader that will allow you to insert tables (or other content) already in markdown format. table-readeris compatible withmkdocs-macros-plugin. This enables further automation like filtering tables or inserting directories of tables. See the documentation on compatibility with macros plugin for more examples.
Documentation and how-to guides
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_table_reader_plugin-3.1.0.tar.gz.
File metadata
- Download URL: mkdocs_table_reader_plugin-3.1.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb15688ee8c0cd1a842f506f18973b87be22bd7baa5e2e551089de6b7f9ec25b
|
|
| MD5 |
fd6e8341d6d3cca3fc8b7c9ca99d83d3
|
|
| BLAKE2b-256 |
a11bca35e4b51a1814924153f7c8afa5a9c2f961688a9c275fa9f4afe7f5083a
|
File details
Details for the file mkdocs_table_reader_plugin-3.1.0-py3-none-any.whl.
File metadata
- Download URL: mkdocs_table_reader_plugin-3.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50a1302661c14d96b90ba0434ae96110441e0c653ce23559e3c6911fe79e7bd2
|
|
| MD5 |
9ee9a7f367e9e29fdb8a65c7d1d5957d
|
|
| BLAKE2b-256 |
b36fdcc966874f74f8580b99d2ffecbdc85dfd00c4a5039fedbee4ddd7fc8c7f
|