Code Monkey home page Code Monkey logo

screenshot-cli's Introduction

first-timers-friendly

screenshot-cli

Screenshot websites via a command-line-interface

Install

git clone https://github.com/Booligoosh/screenshot-cli.git
cd screenshot-cli
npm install

Once this is done, add this to your bash preferences file (in this example I am using ~/.bashrc) and source it:

echo "alias screenshot='<path-to-screenshot-folder>/pic-simple.js'" >> ~/.bashrc
source ~/.bashrc

Usage

screenshot -u <url> -p <folder-path> -n <filename-without-extension>

You can also supply a custom resolution for the screenshot by providing the -w and -h flags

screenshot -u <url> -p <folder-path> -n <filename-without-extension> -h <height> -w <width>

Contributing

first-timers-friendly

Contributions are welcome. Please see the issues, or add anything that your brain can conjure up!

Credits

This project was based on A Guide to Automating & Scraping the Web with JavaScript (Chrome + Puppeteer + Node JS), a really awesome article that you should check out.

screenshot-cli's People

Contributors

pandabearcoder avatar

Stargazers

Ethan avatar

Watchers

James Cloos avatar Ethan avatar

Forkers

pandabearcoder

screenshot-cli's Issues

Create screen size options in command

See line 9.

Use the flags -w <width> -h <height>, which you can get though argsv.w and argsv.h in the code.

You will need to update the usage in the readme and in the console.log statement to include the new flag.

Also, make the width and height optional - you could have an if statement saying if they are undefined then set them to a default value. The default value should preferably be the screen size of the device.

Preferably I would like to leave this to a first-timer, as it would be fun and a great way to get into Open Source. I'm happy to help you with any questions or issues if you need.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.