<h1>htmlgrep</h1>
<p>
htmlgrep is a suite of command-line tools for searching HTML documents,
that allows selecting elements by various types of selectors.
<p>
It currently only provides a single utility program:
<dl>
<dt><a href=/htmlgrep/plain/doc/css.1.html>css(1)</a>
<dd>
Search HTML documents by CSS selector,
similar to <a href=https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll><code>Document.querySelectorAll()</code></a>.
</dl>
<h2>Features</h2>
<p>
TODO.
<h2>Library</h2>
<p>
You can also use htmlgrep programmatically:
<pre>
extern crate htmlgrep;
fn main() {
let input = r#"
<!doctype html>
<meta charset=utf>
<title>My first blog post</title>
<meta name=keywords content=blog,first,hello>
<meta name=description content="First entry to blog.">
"#;
let matches = htmlgrep::select("meta[name=keywords]", input.as_bytes()).unwrap();
for node in matches {
println!("{}", node.source);
}
}
</pre>
<h2>Source code</h2>
<p>
Install with <code>cargo install htmlgrep</code>.
<p>
Download current or past <a href=https://git.sny.no/htmlgrep/refs/tags>releases</a>.
<p>
Clone the repo from <code>git clone https://git.sny.no/htmlgrep</code>.
<p>
See the <a href=https://git.sny.no/htmlgrep/tree/README>README</a> for build instructions.