I'm embarrassed I don't know the answer to this since I work on this stuff all the time. I suspect there is already something that does just what I want which is to turn HTML into plain text while maintaining some semblance of layout semantics, e.g.-
Would become
* List item
and links would be shown with their href attribute. I have no need to handle tables with this.
So, please forgive me if I'm being a dummy. Script (to look at) or package for this? I can do it from scratch but would rather not if it's already out there.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |