Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frinyvonnick/node-html-to-image-cli
A cli based on node-html-to-image that generates images from HTML
https://github.com/frinyvonnick/node-html-to-image-cli
Last synced: 8 days ago
JSON representation
A cli based on node-html-to-image that generates images from HTML
- Host: GitHub
- URL: https://github.com/frinyvonnick/node-html-to-image-cli
- Owner: frinyvonnick
- License: apache-2.0
- Created: 2019-12-05T19:23:25.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-02T23:30:44.000Z (about 2 years ago)
- Last Synced: 2024-10-03T12:24:22.341Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/node-html-to-image-cli
- Size: 15.6 MB
- Stars: 42
- Watchers: 4
- Forks: 7
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome-list - node-html-to-image-cli - html-to-image that generates images from HTML | frinyvonnick | 42 | (JavaScript)
README
Welcome to node-html-to-image-cli 👋
> A cli based on node-html-to-image that generates images from HTML
### 🏠 [Homepage](https://github.com/frinyvonnick/node-html-to-image-cli)
## Description
This is cli is based on [node-html-to-image](https://github.com/frinyvonnick/node-html-to-image). It generates an image from an HTML file. `node-html-to-image` provides more options and lets you pass down custom configuration to puppeteer which is used under the hood.
![node-html-to-image-cli's demo](https://raw.githubusercontent.com/frinyvonnick/node-html-to-image-cli/master/misc/demo.gif)
## Prerequisites
- node >=10
## Install
This step is uneccessary if you use npx.
```sh
yarn add global node-html-to-image-cli
# or
npm install -g node-html-to-image-cli
```## Usage
Without handlebars template
```sh
npx node-html-to-image-cli examples/simple.html ./image.png
```With additional data passed to the template
```sh
npx node-html-to-image-cli examples/handlebars.html ./image.png --content ./examples/handlebars.json
```### Arguments
| Argument | Description |
|----------|------------------------------------|
| html | path to a html file |
| output | path where image should be created |### Options
| Option | Alias | Description |
|-----------|-------|-------------------------------------------------|
| --type | -t | type of image that should be generated |
| --transparent | none | determine if background of the generated image should be transparent |
| --content | -c | path to a content file with handlebars template |## Related
- [node-html-to-image](https://github.com/frinyvonnick/node-html-to-image) - API for this cli
## Author
👤 **FRIN Yvonnick **
* Website: [https://yvonnickfrin.dev](https://yvonnickfrin.dev)
* Twitter: [@yvonnickfrin](https://twitter.com/yvonnickfrin)
* Github: [@frinyvonnick](https://github.com/frinyvonnick)## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/frinyvonnick/node-html-to-image-cli/issues).## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2019 [FRIN Yvonnick ](https://github.com/frinyvonnick).
This project is [Apache--2.0](https://github.com/frinyvonnick/node-html-to-image-cli/blob/master/LICENSE) licensed.***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_