An open API service indexing awesome lists of open source software.

https://github.com/becklyn/searchtexttransformer

A library that extracts plain text from HTML for usage in search engines (like Elasticsearch)
https://github.com/becklyn/searchtexttransformer

Last synced: about 1 month ago
JSON representation

A library that extracts plain text from HTML for usage in search engines (like Elasticsearch)

Awesome Lists containing this project

README

        

Search Text Transformer
=======================

Transforms HTML to searchable plain text for usage in conjunction with a search engine (like Elasticsearch).

Installation
------------

Install via composer.

Usage
-----

```php
transform("

Some HTML content

");
```

Testing
-------

All test cases belong into `tests/fixtures` and must have the file extension `.test`.

The test format is:

```
--TEST--
Here is a plain text description of this test.
--HTML--

Some html.


--EXPECT--
The expected result.
```

The `--TEST--` segment is optional.