There is no license information available for the latest version (dev-master) of this package.

Clips out marked parts from textfile

dev-master 2015-03-21 22:13 UTC

This package is not auto-updated.

Last update: 2020-11-13 19:34:26 UTC


Clipper is a small utility to take a text and clip regions marked with your own marks. Use it for example to clip only relevant parts from your html pages to generate pdf. Marks can be nested

$text = <<<EOF
<ul class="menu">
  <li> Wow

Clipping text between marks

$clipper = new Clipper('<!--start-->', '<!--end-->');
$result = $cliper->clip($text)

# $result contains <body><p>LoremIpsum</p>

Clipping text not between marks

$result = $clipper->clipExclued($text);

#result contains <html><body><ul class="menu"><li>Wow</ul><footer></footer></html>