Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kamataryo/wwwdiff
A simple CLI tool to make a diff image between 2 web pages
https://github.com/kamataryo/wwwdiff
Last synced: 2 months ago
JSON representation
A simple CLI tool to make a diff image between 2 web pages
- Host: GitHub
- URL: https://github.com/kamataryo/wwwdiff
- Owner: kamataryo
- Created: 2020-04-20T10:07:01.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T08:00:33.000Z (over 3 years ago)
- Last Synced: 2024-09-25T21:53:23.439Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 918 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wwwdiff
![https://github.com/kamataryo/wwwdiff/actions](https://github.com/kamataryo/wwwdiff/workflows/npmpublish/badge.svg)
wwwdiff is a simple CLI tool to make a diff image between 2 web pages.
## Prerequisite
- Node.js > 10
## Usage
```shell
$ npm install -g wwwdiff
$ wwwdiff https://example.com/a https://examle.com/b > sample.png
```Or you can use `wwwdfiff` via `npx`, perhaps it downloads Chromium browser (120MB) for every time.
```shell
$ npx wwwdiff https://example.com/a https://examle.com/b > sample.png
```## Example
Example with 2 WordPress posts.
| Sample A | Sample B | Diff |
| :-------------------------- | :-------------------------- | :-------------------------------- |
| ![sample a](./sample-a.png) | ![sample b](./sample-b.png) | ![diff sample](./sample-diff.png) |## options
```shell
$ wwwdiff -hwwwdiff is a simple CLI tool to make a diff image between 2 web pages.
Usage
$ wwwdiff https://example.com/a https://example.com/b > diff.png
Options
--color, -c hightlighting color. The default is #ff00ff.
--delay, -d duration until shot. The default value is 0.
--output, -o Use specified file path as output, not sdtout.
--width, -w viewport width.
--verbose shows debug messages.
```### Tips
You can take a single screenshot with one URL argument.
```shell
$ wwwdiff https://example.com/a > example.png
```### Examples with options
```shell
# Wait 10 seconds before taking screenshots.
$ wwwdiff --delay 10000 https://example.com/a https://example.com/b > diff.png
``````shell
# Specify output file with option, not using stdout.
$ wwwdiff https://example.com/a https://example.com/b --output diff.png
``````shell
# Use specified width for viewport..
$ wwwdiff --width 680 https://example.com/a https://example.com/b > diff.png
$ wwwdiff --width 2048 https://example.com/a https://example.com/b > diff.png
``````shell
# show debug infomation.
$ wwwdiff --verbose https://example.com/a https://example.com/b > diff.png
```