MightyString adds array functionality and other tools for Ruby strings, including matching, indexing, substitution, and deletion. MightyString::HTML.strip_html provides more ideal HTML-to-ASCII formatting output. This is an advanced block "filtering" module. It works very well, with extremely rare cases which fall through its fingers.
Xidel is a command line tool to download Web pages and extract data from them. It can download files over HTTP/S connections, follow redirections, links, or extracted values, and process local files. The data can be extracted using XPath 2.0, XQuery 1.0, and JSONiq expressions, CSS 3 selectors, and custom, pattern-matching templates that are like an annotated version of the processed page. The extracted values can then be exported as plain text/XML/HTML/JSON, or assigned to variables to be used in other extract expressions or be exported to the shell. There is also an online CGI service for testing.