A library for converting a HTML tables into ASCII tables, rowspan and colspan allowed!
Project description
When it comes to converting html to rst, pandoc does an excellent job… except for tables. dashtable is designed to fill this gap by creating a way to convert html tables into reStructuredText or Markdown.
dashtable also has functions for converting data to reStructuredText tables and Markdown tables, as well as methods for generating data from these text-tables.
Methods
- html2rst:
Convert html table to RST grid table
- html2md:
Convert html table to Markdown table
- data2md:
Convert a list of lists of strings to Markdown Table
- data2rst:
Convert a list of lists of strings to RST grid Table
- data2md:
Convert a list of lists of strings to a Markdown Table
- data2simplerst:
Convert a list of lists of strings to a simple RST Table
- grid2data:
Convert an RST grid table to data
- simple2data:
Convert a simple RST table to data
Installation
dashtable can be installed using pip:
sudo pip install dashtable
Depending on how you’d like to use dashtable, you may need to install some dependencies.
Dependencies
Several of the functions in dashtable have no outside requirements. However, for the following functions you will need to install certain dependencies:
- html2rst:
BeautifulSoup, pandoc (optional)
- html2md:
- html2data:
BeautifulSoup, pandoc (optional)
- grid2data:
- simple2data:
Usage
Complete documentation on usage can be found on Read the Docs.
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.