CLI script to take screenshots for a specific URL. useful to take images for your personal projects
These instructions will get you a copy of the project up and running on your local machine for development and usage purposes.
STEPS-
You need to have Node
installed and the Google Chrome
browser.
Clone or download this repository.
git clone [email protected]:HenryTabima/websites-screenshot-cli.git
Open the project folder and install dependencies
cd websites-screenshot-cli
npm install
node urlscreenshot.js --url [url's site]
or
chmod +x urlscreenshot.js // this is only once
./urlscreenshot.js --url [url's site]
PD: is better if you copy and paste the url from the website
module.exports = {
dir: './screenshots',
screen: {
width: 1920,
height: 1080
}
}
dir
is to define where you want to save your screenshots.
screen
is to define the width and height of the screenshot.
- Puppeteer - Node library which provides a high-level API to control Chrome or Chromium
- Minimist - simple cli argument parser
Henry Tabima Giraldo 📖 |
This project is licensed under the MIT License - see the LICENSE.md file for details