Allow direct HTML input
fisker opened this issue · 5 comments
fisker commented
Before I start, there is something I want cofirm,
If we add the same flag --input-type
like capture-website
will ask people use like
capture-website "<h1>awsome</h1>" screenshot.png --input-type html
I think this flag might not easy to use, I suggest we use --html
boolean flag, this will be easier to user
capture-website "<h1>awsome</h1>" screenshot.png --html
And we should probably support stdin
, so we can
curl https://www.google.com | capture-website screenshot.png --html
cat my.html | capture-website --html > screenshot.png
sindresorhus commented
fisker commented
There might be confusion to support stdin
cat myfile | capture-website screenshot.png --html
- capture-website string
screenshot.png
and output tostdout
- capture-website string from
myfile
and output toscreenshot.png
It's not clear.
Add --filename
or --output
?
sindresorhus commented
Let's change it to a --output
flag for all uses. I don't think we need a --html
flag. We just make stdin be the only way to input raw HTML.
So this will be how you use it:
echo '<h1>dad</h1>' | capture-website --output=screenshot.png
capture-website myfile.html --output=screenshot.png
fisker commented
OK