Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wiledal/sitesnap
Simple site screenshotting utility
https://github.com/wiledal/sitesnap
Last synced: about 2 months ago
JSON representation
Simple site screenshotting utility
- Host: GitHub
- URL: https://github.com/wiledal/sitesnap
- Owner: wiledal
- Created: 2016-08-23T21:24:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-09T12:59:25.000Z (about 8 years ago)
- Last Synced: 2024-10-17T00:22:35.649Z (4 months ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sitesnap
[![npm version](https://badge.fury.io/js/sitesnap.svg)](https://badge.fury.io/js/sitesnap)Screenshot sites from the terminal.
Uses Electron (Chromium) for rendering and capture.
Largely inspired by [Electroshot](https://github.com/mixu/electroshot).## What?
Basic cli site screenshotting utility.
Takes a screenshot of the desired site at the desired width, height and after a set delay.
Outputs a high quality retina jpg.## Installation
`npm install -g sitesnap`## Usage
`sitesnap [--options]`If no `--height` is supplied, `sitesnap` will try to snap the full length of the page (capped at 8000px).
**Run `sitesnap --help` for full list of options.**
## Example usage
Take a 1200x1200 screenshot of github.com at 1x scale (non-retina) and 50% quality:
`sitesnap http://github.com screenshot-output.jpg --height 500 --quality 50 --scalefactor 1`## Headless usage
To use `sitesnap` on a headless server you need some kind of display driver such as Xvfb.
```sh
# Install Xvfb and dependencies
apt-get update
apt-get install -y libgtk2.0-0 libgconf-2-4 libasound2 libxtst6 libxss1 libnss3 xvfb# Start Xvfb and expose DISPLAY
Xvfb -ac -screen scrn 1280x2000x24 :9.0 & export DISPLAY=:9.0
```## License
ISC LicenseCopyright (c) 2016, Hugo Wiledal
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.