Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tako8ki/html3png
html3png is a extension of html2png and a CLI for converting HTML to PNG.
https://github.com/tako8ki/html3png
html node png puppeteer
Last synced: 18 days ago
JSON representation
html3png is a extension of html2png and a CLI for converting HTML to PNG.
- Host: GitHub
- URL: https://github.com/tako8ki/html3png
- Owner: TaKO8Ki
- License: mit
- Created: 2020-05-15T09:48:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T06:01:12.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T23:51:07.295Z (about 1 month ago)
- Topics: html, node, png, puppeteer
- Language: JavaScript
- Homepage:
- Size: 4.72 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# html3png
![](https://github.com/TaKO8Ki/html3png/workflows/CI/badge.svg) ![](https://img.shields.io/npm/dt/html3png.svg) ![](https://img.shields.io/npm/l/html3png)
html3png is a CLI for converting HTML to PNG. If you set --id flag, you can clip your HTML and convert it to PNG.
- [html3png](#html3png)
- [Installation](#installation)
- [Flags](#flags)
- [Usage](#usage)
- [Convert HTML to PNG](#convert-html-to-png)
- [Convert clippted HTML to PNG](#convert-clippted-html-to-png)## Installation
You can install via npm.
```sh
$ npm install -g html3png
```## Flags
```
html3png [args]Options:
-f, --file Input file [string][required]
-o, --output Output file [string][default: "out.png"]
-i, --id Clip img [string]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]Examples:
html3png -f example.html -o out.png
```## Usage
[exapmle.html](https://github.com/TaKO8Ki/html3png/blob/master/example.html)
### Convert HTML to PNG
```sh
# convert target html file to png.
# you can set output file name.
$ html3png -f example.html -o example.png
```![1](https://user-images.githubusercontent.com/41065217/82092663-afb21a80-9734-11ea-9dac-3bd40590e0ca.png)
### Convert clippted HTML to PNG
[exapmle.html](https://github.com/TaKO8Ki/html3png/blob/master/example.html)
```sh
# if you use id flag, you can convert html inside a element with id you give to png.
$ html3png -f example.html -i image
```![2](https://user-images.githubusercontent.com/41065217/82091252-fb16f980-9731-11ea-8d11-e62c99830703.png)