Skip to content

Releases: Encephos/html-table-rescuer

v0.3.1 — Jupyter/Colab rendering + demo notebook

Choose a tag to compare

@Encephos Encephos released this 30 Jul 12:51

Added

  • ParsedTable now renders as a real table in Jupyter/Colab via _repr_markdown_.
  • Interactive Colab demo notebook (examples/demo.ipynb) — try the tool in the browser without installing anything: badge in the README.

Full Changelog: v0.3.0...v0.3.1

v0.3.0 — LlamaIndex and Haystack integrations

Choose a tag to compare

@Encephos Encephos released this 30 Jul 09:48

Added

  • LlamaIndex integration: HTMLTableRescuerReader (extra: llamaindex). Each table becomes its own Document. Works as a file_extractor in SimpleDirectoryReader; extra_info passed by the framework takes precedence over the reader's own metadata.
  • Haystack integration: HTMLTableRescuerConverter (extra: haystack). Unlike Haystack's own HTMLToDocument, one source yields one Document per table. Accepts file paths and ByteStreams, follows the Haystack convention of skipping unreadable sources with a warning instead of failing the pipeline, and supports to_dict/from_dict so a ParseConfig survives pipeline serialization. Compatible with both haystack-ai 2.x and 3.x.
  • Test coverage for all framework integrations (26 tests); the LangChain loader was previously untested.

Full Changelog: v0.2.1...v0.3.0

v0.2.1 — Package renamed to html-table-rescuer

Choose a tag to compare

@Encephos Encephos released this 30 Jul 09:11

Changed

  • Breaking: the import package was renamed from table2md to html_table_rescuer, matching the distribution name and the renamed GitHub repository. Update your imports: from html_table_rescuer import TableParser.
  • The installed CLI command is now html-table-rescuer (was table2md).
  • The LangChain loader class was renamed from Table2MDLoader to HTMLTableRescuerLoader.

Full Changelog: v0.2.0...v0.2.1

v0.2.0 — CLI, robustness fixes, and CI

Choose a tag to compare

@Encephos Encephos released this 30 Jul 08:31

Added

  • New table2md CLI: file, URL, or stdin input (curl … | table2md works), with --format markdown|json|csv, --strategy, --dito-prefix, --table, --output, --no-links/--no-bold/--no-italic, and --parser.
  • Public API exports from the package root: from table2md import TableParser.
  • py.typed marker (PEP 561).
  • CI workflow: ruff + pytest on Python 3.9 and 3.12.
  • Test suite grown from 9 to 50 tests, including the 13 example cases as regression tests.

Fixed

  • Invalid colspan/rowspan values ("", "abc", "0", negative) no longer crash the parser or silently drop cell content.
  • rowspan is now capped at the last table row (matching browser behavior); huge values like rowspan="10000" no longer allocate unbounded grids.
  • HTML comments no longer leak into cell output.
  • README installation instructions now name the actual PyPI package (html-table-rescuer).

Full Changelog: v0.1.0...v0.2.0

Initial Release v0.1.0

Choose a tag to compare

@Encephos Encephos released this 29 Jul 09:29
31fcf98

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, RowspanStrategy

Config 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.