• Stars
    star
    272
  • Rank 150,364 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 12 years ago
  • Updated about 8 years ago

Reviews

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

Repository Details

Full webpage capture command-line tool with PhantomJS and NodeJS

CaptureJS

Npm version Build Status Dependency Status

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

Installation

First install PhantomJS.

$ 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)
  -W, --web-security               Enables web security and forbids cross-domain XHR (default is true) (true|false|yes|no)
  -s, --selector <value>           CSS selector
  -A, --user-agent <value>         UserAgent
  -J, --javascript-file <value>    Inject external script code from the specified file into the page
  -j, --inject-script              Inject in-line custom scripts into the 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.

More Repositories

1

zsh-kubectl-prompt

Display information about the kubectl current context and namespace in zsh prompt.
Shell
557
star
2

opener

Open URL in your local web browser from the SSH-connected remote environment.
Go
141
star
3

kubectl-open-svc-plugin

kubectl open-svc plugin makes services accessible via their ClusterIP from outside your cluster
Go
119
star
4

kubectl-view-serviceaccount-kubeconfig-plugin

A kubectl plugin that show a kubeconfig to access the apiserver with a specified serviceaccount.
Go
110
star
5

ksort

Sort manfest files in a proper order by Kind
Go
59
star
6

close-pull-request

A GitHub Action to automatically close pull requests.
JavaScript
45
star
7

minikube-ingress-dns

Configure and restart dnsmasq automatically for k8s Ingress LB on minikube.
Shell
35
star
8

vim-quickrun-markdown-gfm

vim-quickrun plugin for Markdown by GitHub Markdown API
CSS
29
star
9

electron-boilerplate

A electron app template with React, babel, sass, gulp and bower 🎉
JavaScript
13
star
10

dotfiles

my config files
Vim Script
8
star
11

gyazo-dropbox

yet another Gyazo Server with Dropbox
Ruby
7
star
12

ga

The GitHub Actions helper command-line tool
TypeScript
7
star
13

node-imageviewurlreplace

JavaScript
5
star
14

vim-vimperator

VIMperator configuration file
Vim Script
5
star
15

ansible-bootstrap-devenv

Ansible playbooks for bootstrapping development environment
Shell
5
star
16

prometheus-up-and-running-ja-examples

『入門 Prometheus』9章 コンテナとKubernetes サンプルファイル Kubernetes 1.13 対応版
HCL
5
star
17

devbox

A Docker image for my development environment
Shell
4
star
18

debug

My debugging container image
Dockerfile
4
star
19

kojin-no-kenkai-jp

個人の見解.jp
JavaScript
4
star
20

httpdebugger

This is an http.RoundTripper that will display information about the requests passing through it based on what is configured.
Go
4
star
21

marklite

JavaScript
3
star
22

kubectl-expla.in

Awesome kubectl explain 🎉
JavaScript
2
star
23

text.superbrothers.dev

HTML
2
star
24

brewfile

Ruby
2
star
25

feedmaker

JavaScript
1
star
26

superbrothers.github.com

1
star
27

homebrew-whalebrew

Ruby
1
star
28

kind-wrapper

Shell
1
star
29

kubectl-plugins

My kubectl plugin scripts.
Shell
1
star
30

paperclip-sample-app

rails3.1 paperclip2.4.1
Ruby
1
star
31

setup-ga

This action sets up ga which is the GitHub Actions helper command-line tool.
TypeScript
1
star
32

anime-blu-ray-box-feed

JavaScript
1
star