Sign inSign up

ryysud/screenshot2slack

By ryysud

•Updated about 5 years ago

screenshot2slack is a tool uploading a screenshot to slack with puppeteer on docker.

Image
0

2.6K

ryysud/screenshot2slack repository overview

⁠screenshot2slack

Tags Docker Build Status Docker Pulls License

⁠Overview

screenshot2slack is a tool uploading a screenshot to slack with puppeteer on docker.

Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol.
See https://github.com/GoogleChrome/puppeteer⁠ .

⁠Requirements

⁠Usage

⁠Getting started
$ docker run --rm \
    -e SLACK_BOT_TOKEN=xxx-xxx-xxx \
    -e CHANNEL=your-channel \
    ryysud/screenshot2slack:latest
⁠Specify URL, width and height
$ docker run --rm \
    -e SLACK_BOT_TOKEN=xxx-xxx-xxx \
    -e CHANNEL=your-channel \
    -e TARGET_URL=https://github.com/ryysud/screenshot2slack \
    -e WIDTH=1920 \
    -e HEIGHT=1080 \
    ryysud/screenshot2slack:latest
⁠Via Basic authentication
$ docker run --rm \
    -e SLACK_BOT_TOKEN=xxx-xxx-xxx \
    -e CHANNEL=your-channel \
    -e TARGET_URL=https://example.com/path/to/basic-authentication-page \
    -e BASIC_AUTH_USERNAME=username \
    -e BASIC_AUTH_PASSWORD=password \
    ryysud/screenshot2slack:latest

⁠Environment Variables

NameDescriptionRequiredDefault
SLACK_BOT_TOKENToken string to post to slack.◯-
TARGET_URLScreen shot target URL.-https://github.com
FILE_NAMEFile name to post.-example.png
WIDTHWidth of browser.-1280
HEIGHTHeight of browser.-768
FULL_PAGEWhen true, takes a screenshot of the full scrollable page.-false
CHANNELSlack channel name to post.-general
BASIC_AUTH_USERNAMEUsername to pass basic authentication.-null
BASIC_AUTH_PASSWORDPassword to pass basic authentication.-null
COOKIESJSON Array string to pass to browser.-null
SCREENSHOT_DELAY_SECNumber of seconds to delay time to take screenshot.-null

Example of COOKIES

[
    {"name": "_session", "value": "xxx", ...},
    {"name": "foo", "value": "bar", ...},
    ...
]

See Puppeteer Docs⁠.

⁠License

Tag summary

Content type

Image

Digest

Size

546.7 MB

Last updated

about 5 years ago

docker pull ryysud/screenshot2slack