用于将HTML表转换为ASCII表的库,允许使用Rowspan和ColSpan!
dashtable的Python项目详细描述
dashtable具有将数据转换为structuredtext的功能 表和降价表,以及从中生成数据的方法 这些文本表格。它可以快速地将html表转换为rst,但是 使用pandoc可能会有更好的效果。
方法
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 |
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 |
安装
dashtable可以使用pip安装:
sudo pip install dashtable
根据您希望如何使用dashtable,可能需要安装 一些依赖关系。
依赖关系
dashtable中的几个函数没有外部要求。 但是,对于以下功能,您需要安装 依赖关系:
html2rst: | BeautifulSoup, |
---|---|
html2md: | BeautifulSoup |
html2data: | BeautifulSoup, |
grid2data: | docutils |
simple2data: | docutils |
使用量
有关用法的完整文档可以在Read the Docs上找到。