PHPackages                             acseo/domscribe - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. acseo/domscribe

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

acseo/domscribe
===============

A PHP library for converting HTML to semantic Markdown, preserving structure and meaning

00PHP

Since Mar 9Pushed 2mo agoCompare

[ Source](https://github.com/acseo/domscribe)[ Packagist](https://packagist.org/packages/acseo/domscribe)[ RSS](/packages/acseo-domscribe/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Domscribe PHP: Semantic Markdown Converter
==========================================

[](#domscribe-php-semantic-markdown-converter)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/f9a61eee600abfa4c06628ff826dc6a7dfffc0cceca828fd79751b43e44f451f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e302d626c75652e737667)](https://php.net)

> A powerful PHP library for converting HTML to semantic Markdown, preserving the structure and meaning of the original content.

This library is a PHP port of [domscribe-python](https://github.com/slava-vishnyakov/domscribe), which itself is based on [dom-to-semantic-markdown](https://github.com/romansky/dom-to-semantic-markdown).

🚀 Features
----------

[](#-features)

- **Semantic preservation**: Maintains the semantic structure of HTML during conversion
- **Complex structure handling**: Handles nested lists, tables, and other complex HTML structures
- **Highly customizable**: Extensive options to tailor the conversion process
- **Main content extraction**: Automatically identifies and extracts the main content from web pages
- **LLM-friendly output**: Optimized for Language Model processing with special annotations
- **Well-tested**: Comprehensive test suite with PHPUnit
- **Modern PHP**: Uses PHP 8.0+ features with strict typing

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require acseo/domscribe
```

📖 Basic Usage
-------------

[](#-basic-usage)

```
