Initial Release v0.1.0
Initial Release v0.1.0
We are excited to announce the first release of the html-table-rescuer!
This library was built specifically to solve a massive pain point in RAG (Retrieval-Augmented Generation) and LLM data prep pipelines: Extracting complex HTML tables into clean Markdown without breaking the structure.
Unlike simple formatters, this parser mathematically resolves colspan and rowspan attributes, ensuring that columns stay aligned and contextual information is preserved for LLMs.
Features in this Release
- Grid Logic Solver: Perfectly handles nested and spanned cells (rowspan / colspan).
- Context Preservation: Fills spanned cells with context (e.g., dito (Value)) so LLMs don't lose the semantic relationship.
- Deep Tag Parsing: Recursively extracts bold, italic, and links even if they are buried deep inside div or span wrappers.
- Nested Table Support: Extracts nested tables safely without destroying the grid of the parent table.
- Multiple Export Formats: Export directly to GitHub-Flavored Markdown, JSON, or CSV.
- LangChain Integration: Includes a ready-to-use Table2MDLoader to ingest HTML tables as LangChain Document objects.
Quick Start
pip install html-table-rescuer
Python
from table2md.core import TableParser
from table2md.models import ParseConfig, RowspanStrategyConfig optional (Default uses 'dito' strategy)
config = ParseConfig(rowspan_strategy=RowspanStrategy.FILL_WITH_DITO)
parser = TableParser("<table>...</table>", config)
tables = parser.parse()
if tables:
print(tables[0].to_markdown())🤝 Feedback & Contributions
Since this is the initial release, feedback is highly appreciated! Please open an issue if you encounter a table structure that breaks the parser.