🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

placebot

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

placebot

slack bot that adds placeholder images

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

placebot

Current Version

Slack bot for inserting placeholder images.

How to Run

placebot is a simple HTTP server based on hapi. To start placebot, run the following command:

node index template_url

template_url is a URL that acts as a template for the placeholder service of your choice. The URL should contain the strings {width} and {height}. These represent the width and height of the desired placeholder image, and will be substituted dynamically when placebot is called.

An example usage of the placebot server that refers to the Placehold.it service is shown below:

node index "http://placehold.it/{width}x{height}"

How to Use

  • Host the placebot code somewhere (for example, Heroku).
  • Set up an Outgoing WebHook in Slack. Note that your WebHook should allow the user to specify the width and height as a string widthxheight. placebot will parse these out using the regular expression /(\d+)x(\d+)/. If the image dimensions are not specified, they will default to 250.

FAQs

Package last updated on 16 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts