galvao/gerdr

Manipulate DOM HTML trees

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

Type:project

pkg:composer/galvao/gerdr

0.1.0-alpha 2019-10-02 14:44 UTC

This package is auto-updated.

Last update: 2025-10-19 12:37:11 UTC


README

Gerdr Logo

Manipulate DOM HTML trees, powered by PHP's DOM extension.

Install

composer require galvao/gerdr

Usage

  • As an application
/path/to/gerdr/bin/gerdr -c /path/to/config.json -d /path/to/dom.html

As an application Gerdr outputs the modified DOM HTML so it can be piped, forwarded, etc... to any bash application.

  • In your project:
try {
    $gerdr = new Gerdr($dom, $config);
} catch (\Exception $e) {
    // Treat the exception
}

try {
    $gerdr->process();
} catch (\Exception $e) {
    // Treat the exception
}

$result = $gerdr->getModifiedDom();

Dependencies

Actions

As of now Gerdr only removes elements/attributes with the remove action.

Acknowledgements