ageitgey / node-unfluff

Automatically extract body content (and other cool stuff) from an html document
Apache License 2.0
2.15k stars 223 forks source link

Adding support for field flag. #75

Closed gburtini closed 7 years ago

gburtini commented 7 years ago

The field flag allows one to use unfluff as a CLI tool for reading content. e.g, curl http://2ality.com/2017/03/es-integer.html | unfluff -f text.

Ideally this gets error handling for invalid field flags before merge.

ageitgey commented 7 years ago

The way you've written this might cause it to parse text from stdin before stdin is done reading. It needs to wait for the end callback on stdin before processing the text.

gburtini commented 7 years ago

Agreed. It's an easy fix, but I am going to abandon this for now.