docs: add CLI help to readme (#18)

This commit is contained in:
Fathy Boundjadj 2022-11-17 00:36:54 +01:00 committed by GitHub
parent dc8e2f505b
commit 48df491edc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -10,6 +10,20 @@ $ docker run fathyb/html2svg https://google.com > google.svg
$ docker run fathyb/html2svg https://google.com --format svg > google.svg
# export to PDF
$ docker run fathyb/html2svg https://google.com --format pdf > google.pdf
# show help
$ docker run fathyb/html2svg --help
Usage: html2svg [options] <url>
Arguments:
url URL to the web page to render
Options:
-f, --full capture the entire page
-w, --wait <seconds> set the amount of seconds to wait between the page loaded event and taking the screenshot (default: 1)
-w, --width <width> set the viewport width in pixels (default: 1920)
-h, --height <height> set the viewport height in pixels (default: 1080)
-f, --format <format> set the output format, should one of these values: svg, pdf (default: "svg")
--help display help for command
```
## Development

View File

@ -13,7 +13,7 @@ program
.option('-f, --full', 'capture the entire page')
.option(
'-w, --wait <seconds>',
'amount of time to wait between the page loaded event and taking the screenshot',
'set the amount of seconds to wait between the page loaded event and taking the screenshot',
validateInt,
1,
)