No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode
.env.defaults
.eslintrc.js
.gitignore
LICENSE
README.md
app.js
cardTemplate.html
package-lock.json
package.json

README.md

puppeteer-dynamic-bot-graphics-sample

This repo is the sample code for the technique described in this blog post: . The general idea is that we can create dynamically generate static visualizations for chat bots and other applications by utilizing our existing HTML/JS/CSS skillsets within the context of Headless Chrome.

To run the sample:

  1. Create an account with World Weather Online to get trial access to their historical weather API.
  2. Create a .env file based on the template in .env.defaults. The file should include the World Weather Online API Key and an optional port.
  3. Run npm install
  4. Run npm start

To generate an image for a city, point your browser to http://localhost:PORT/api/CITYNAME. This will fetch the data from the API and use Headless Chrome to generate a graphic using C3.js.