Code Monkey home page Code Monkey logo

screenshots's Introduction

GH Language GH stars GH tag GH License Take screenshots

pforret/screenshots

Let GitHub automatically make screenshots of all your websites

Usage

Create new repo with this one as template

img.png

Method 1 (CLI)

# clone the new repo to your local machine
git clone [email protected]:<your username>/<your repo>.git
cd <your repo>

# remove all images from the images folder
rm images/*.png

# replace the URLS in sites.txt by your own URLs
echo "https://www.yoursite.com" > sites.txt
echo "https://www.yourothersite.com" >> sites.txt
...

# check in the repo with changes
git -a -m "new sites"

# wait until Github Actions have run and created all your screenshots

# now get the updated image files
git pull

Method 2 (GitHub UI)

Or just edit the sites.txt file on github.com

img.png

Run locally

You can also run the screenshot process locally on your machine. You will need to install shot-scraper.

# clone the new repo to your local machine
git clone [email protected]:<your username>/<your repo>.git
cd <your repo>

# install shot-scraper
pip install shot-scraper

# remove all images from the images folder
rm images/*.png

# replace the URLS in sites.txt by your own URLs
echo "https://www.yoursite.com" > sites.txt
echo "https://www.yourothersite.com" >> sites.txt
...

# check in the repo with changes
git -a -m "new sites"

# wait until Github Actions have run and created all your screenshots

# now get the updated image files
git pull

Script screenshots.sh

Program : screenshots.sh  by [email protected]
Version : v1.0.0 (2023-05-16 15:16)
Purpose : take the screensots with shotscraper
Usage   : screenshots.sh [-h] [-q] [-v] [-f] [-l <log_dir>] [-t <tmp_dir>] [-o <out_dir>] [-d <delay>] [-w <width>] [-h <height>] [-x <export>] <action> <input?>
Flags, options and parameters:
    -h|--help        : [flag] show usage [default: off]
    -q|--quiet       : [flag] no output [default: off]
    -v|--verbose     : [flag] also show debug messages [default: off]
    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]
    -l|--log_dir <?> : [option] folder for log files   [default: log]
    -t|--tmp_dir <?> : [option] folder for temp files  [default: tmp]
    -o|--out_dir <?> : [option] output folder for screenshots  [default: images]
    -d|--delay <?>   : [option] seconds to wait for the git action to finish  [default: 80]
    -w|--width <?>   : [option] screenshot width  [default: 1920]
    -h|--height <?>  : [option] screenshot height  [default: 1080]
    -x|--export <?>  : [option] export list of screenshots in Markdown format  [default: index.md]
    <action>         : [choice] action to perform  [options: multi,gha:deploy,gha:update,check,env,update]
    <input>          : [parameter] input file/text (optional)
 

Based on

screenshots's People

Contributors

pforret avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.