0.3.0 • Published 10 years ago

capturejs v0.3.0

Weekly downloads
45
License
MIT
Repository
github
Last release
10 years ago

CaptureJS

Npm version Build Status Dependency Status

CaptureJS is full webpage capture command-line tool with PhantomJS.

Installation

First install PhantomJS less than 2.0.

$ npm install -g capturejs

Usage

Usage: capturejs [options]

Options:
  -u, --uri <value>                URI (required)
  -o, --output <value>             Output image file (required)
  -p, --ssl-protocol <value>       Sets the SSL protocol for secure connections (default is SSLv3) (sslv3|sslv2|tlsv1|any)
  -I, --ignore-ssl-errors          Ignores SSL errors (expired/self-signed certificate errors)
  -s, --selector <value>           CSS selector
  -A, --user-agent <value>         UserAgent
  -J, --javascript-file <value>    Inject external script code on Web page
  -V, --viewportsize <value>       ViewPortSize {width}x{height}
  -C, --cliprect <value>           ClipRect {top}x{left}x{width}x{height} that will be rendered
  -c, --cookies-file <value>       Cookies file
  -T, --timeout <value>            HTTP Timeout (ms)
  -R, --renderdelay <value>        Render delay (ms)
  -W, --waitcapturedelay <value>   Capture delay (ms)
  -z, --zoomfactor <value>         Zoom Factor (default is 1.0, i.e. 100% zoom)

  -v, --version                    Show version number and exit
  -h, --help                       Show this message and exit

Quick Start

% capturejs --uri http://phantomjs.org/ \
            --selector '.header' \
            --viewportsize 1400x1400 \
            --output 'phantomjs.org.png'

phantomjs org

% capturejs --uri http://phantomjs.org/ \
            --selector '.header' \
            --viewportsize 1400x1400 \
            --javascript-file ./hidelogo.js \
            --output 'phantomjs.org_hide_logo.png'
// hidelogo.js
document.querySelector('.header img').style.visibility = 'hidden';

phantomjs org_hide_logo

% capturejs --uri http://phantomjs.org/ \
            --selector '.header' \
            --viewportsize 1400x1400 \
            --javascript-file ./hidelogo.js \                
            --inject-script 'document.querySelector(".header").style.background = 'red';'
            --output 'phantomjs_org_red.png'

phantomjs org_red

Copyright

Copyright (c) 2012 Kazuki Suda. See LICENSE.txt for further details.

0.3.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.3

13 years ago

0.0.2

13 years ago

0.0.1

13 years ago