• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lambda function to capture a URL as PNG, JPG, or GIF using PhantomJS

capture

Lambda function to convert a URL to PNG, JPEG, or GIF using PhantomJS.

Installation

Add capture to your Apex project:

$ git submodule add https://github.com/apex/capture.git functions/capture

Deploy it:

$ apex deploy capture

Try it:

$ apex invoke capture < functions/capture/event.json

API

Input:

  • url (string) URL to render
  • format (string) output format, one of 'png', 'jpeg', or 'gif' (default: 'png')
  • viewport (object) viewport size with .width and .height (default: 1024x800)
  • clip (object) clip rect with .top, .left, .width, and .height (default: none)
  • zoom (number) zoom factor (default: 1)
  • wait (number) wait time in milliseconds (default: 250)
  • backgroundColor (string) body background color (default: none)

Output:

  • capture (string) base64 output

Badges


tjholowaychuk.com Ā Ā·Ā  GitHub @tj Ā Ā·Ā  Twitter @tjholowaychuk

More Repositories

1

up

Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS.
Go
8,780
star
2

gh-polls

Polls for user feedback in GitHub issues
Go
1,762
star
3

log

Structured logging package for Go.
Go
1,362
star
4

gateway

Drop-in replacement for Go net/http when running in AWS Lambda & API Gateway
Go
652
star
5

apex-ui

Apex monochrome Atom theme UI.
CSS
412
star
6

up-examples

Example apps, apis, and sites for Up.
HTML
389
star
7

static

The static site anti-framework ā€“Ā general-purpose library, purpose-built commands for various domains
Go
293
star
8

apex-go

Golang runtime for Apex/Lambda.
Go
293
star
9

node-apex

Node.js module that makes AWS Lambda's user experience a little nicer using promises.
JavaScript
279
star
10

rpc

Simple RPC style APIs with generated clients & servers.
Go
215
star
11

actions

GitHub Actions
Go
176
star
12

gui

GitHub readme UI components
CSS
132
star
13

apex-syntax

Apex monochrome Atom theme syntax.
CSS
128
star
14

apex-shell

Interactive shell for executing commands in AWS Lambda containers.
Go
121
star
15

httpstat

Higher level HTTP tracing for Go
Go
96
star
16

js

Go packages for JavaScript WASM interoperability in the browser
Go
90
star
17

apex-ui-slim

Apex monochrome Atom theme UI (slim variant)
CSS
74
star
18

svg_to_png

Lambda function to convert SVG to PNG using PhantomJS
JavaScript
71
star
19

logs

Apex Logs client for Go.
Go
61
star
20

apex.run

Apex website
HTML
58
star
21

up.js

Up application companion library for Node and the browser
JavaScript
58
star
22

logs-js

Apex Logs client for Node, Deno, and the browser
TypeScript
38
star
23

logs-cloudwatch

Send your AWS CloudWatch Logs to Apex Logs.
Go
38
star
24

httplog

Go http logger for apex/log.
Go
35
star
25

parsers

Performant Go log format parsers.
Go
31
star
26

apex

Old apex/apex
Go
31
star
27

roadmap

Roadmap for Apex Software products
30
star
28

invoke

Lambda invocation helper functions for Go.
Go
27
star
29

logs-winston

Apex Logs integration for the Node.js Winston logging framework
JavaScript
23
star