Skip to main content

Convert HTML to Markdown using Regex, BeautifulSoup4, and filter useless content with Jina Embeddings.

Project description

Convert and Format HTML to Markdown

Purpose

For converting HTML to Markdown and formatting a dataset of HTML content into structured Markdown, with added capabilities of processing text embeddings to identify and remove redundant content.

Installation & Setup

To get started, run:

pip install conv_html_to_markdown

  • No API keys required
  • Run jina_embeddings.py to preemptively download the embeddings model.

Example integration:

  • Please see an example usage in gpt-crawler. This fork of gpt-crawler has the conv_html_to_markdown package integrated into its processing pipeline.

Configuration:

  • You can clone the package repository to configure similarity threshold for removing content, chunk size, maximum number of threads, the file pattern to match when loading files for conversion, and the output file's name.

git clone https://github.com/daethyra/conv_html_to_markdown.git

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conv_html_to_markdown-0.1.2.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

conv_html_to_markdown-0.1.2-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page