Clean HTML to Text
Readable plain text from raw HTML
Clean DataHow it works
1. html-to-text Convert HTML to plain text preserving line breaks 2. trim-lines Trim whitespace from each line 3. squeeze Collapse extra whitespace and blank lines
$ html-to-text | trim-lines | squeeze Examples
Convert a welcome email HTML to plain text
Usage
"<html><body><h1>Welcome</h1><p>Thanks for signing up!</p><p>..." | html-to-text | trim-lines | squeeze Extract readable text from a scraped news article
Usage
"<div class='article'><h2>Breaking News</h2><p>The market ros..." | html-to-text | trim-lines | squeeze Strip HTML from a status dashboard export
Usage
"<table><tr><th>Name</th><th>Status</th></tr><tr><td>Server A..." | html-to-text | trim-lines | squeeze