All Projects → mantoni → phantomic

mantoni / phantomic

Licence: MIT license
Pipe stdin to Phantom.JS

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
HTML
75241 projects
Makefile
30231 projects

Projects that are alternatives of or similar to phantomic

Ttyplot
a realtime plotting utility for terminal/console with data input from stdin
Stars: ✭ 532 (+2560%)
Mutual labels:  console, pipe
px
ps and top for human beings
Stars: ✭ 151 (+655%)
Mutual labels:  console, pipe
GetConsoleHistoryAndOutput
An Incident Response tool to extract console command history and screen output buffer
Stars: ✭ 41 (+105%)
Mutual labels:  console
fancyline
Readline-esque library with fancy features
Stars: ✭ 72 (+260%)
Mutual labels:  console
tty-editor
Opens a file or text in the user's preferred editor
Stars: ✭ 26 (+30%)
Mutual labels:  console
capybara-chromedriver-logger
Enables console.log/error/info output from Javascript feature specs running with Chromedriver
Stars: ✭ 54 (+170%)
Mutual labels:  console
t-rex-game-bot
A bot that plays the Google Chrome T-Rex game for you
Stars: ✭ 60 (+200%)
Mutual labels:  console
selenium BDD framework
Behavioural driven development UI automation framework using selenium, cucumber-java, testng, maven, phantomjs
Stars: ✭ 34 (+70%)
Mutual labels:  phantomjs
MTS
Automation Tools for PHP
Stars: ✭ 111 (+455%)
Mutual labels:  phantomjs
TRA-Ticket-Booker
(已不適用新版臺鐵訂票系統,且不再更新)台灣鐵路訂票應用程式(臺鐵 / 台鐵 / 訂單程票 / 訂來回票),基於 Selenium + PyQt4。
Stars: ✭ 26 (+30%)
Mutual labels:  phantomjs
teletype.js
A hyper-text terminal for web browsers.
Stars: ✭ 18 (-10%)
Mutual labels:  console
lwt-pipe
[beta] A multi-consumer, multi-producers blocking queue and stream for Lwt
Stars: ✭ 30 (+50%)
Mutual labels:  pipe
conv3d-video-action-recognition
My experimentation around action recognition in videos. Contains Keras implementation for C3D network based on original paper "Learning Spatiotemporal Features with 3D Convolutional Networks", Tran et al. and it includes video processing pipelines coded using mPyPl package. Model is being benchmarked on popular UCF101 dataset and achieves result…
Stars: ✭ 50 (+150%)
Mutual labels:  pipe
rocket-pipes
Powerful pipes for TypeScript, that chain Promise and ADT for you 🚌 -> ⛰️ -> 🚠 -> 🏂 -> 🚀
Stars: ✭ 18 (-10%)
Mutual labels:  pipe
kube-design
Kube Design for KubeSphere Console
Stars: ✭ 88 (+340%)
Mutual labels:  console
console-web-ui
Examples to show case how to build web based UI (that can be invoked using curl) for console applications using Javascript(NodeJS)
Stars: ✭ 28 (+40%)
Mutual labels:  console
screenshot.py
Taking a screenshot of a webpage.
Stars: ✭ 49 (+145%)
Mutual labels:  phantomjs
etran
Erlang Parse Transforms Including Fold (MapReduce) comprehension, Elixir-like Pipeline, and default function arguments
Stars: ✭ 19 (-5%)
Mutual labels:  pipe
tty-screen
Terminal screen detection - cross platform, major ruby interpreters
Stars: ✭ 78 (+290%)
Mutual labels:  console
colored-console
🌈 Add some color to your console >_
Stars: ✭ 74 (+270%)
Mutual labels:  console

Phantomic

SemVer License

  • Pipes stdin to PhantomJS
  • Writes script console output to stdout
  • Writes script errors to stderr
  • Exit code 0 if nothing threw, otherwise 1

Install

npm install -g phantomic

Usage

Phantomic does not include PhantomJS itself. Make sure the phantomjs executable is in your PATH or specify with --phantomjs.

Usage: phantomic [options] [file]

Options:
    --debug                Launch the WebKit debugger in a browser
    --port <num>           Explicit port binding for temporary web server. If
                           no port is specified, a random free port is used.
    --phantomjs <path>     Use specified phantomjs binary
    --web-security <bool>  Enables PhantomJS web security and forbids
                           cross-domain XHR (default is true)
    --brout                Assume brout is part of the JS
    --ignore-ssl-errors <bool>  Tell PhantomJS to ignore SSL certificate errors
                                when network requests are made (default is false)
    --viewport-width <num>      Tell PhantomJS about the desired viewport width
    --viewport-height <num>     Tell PhantomJS about the desired viewport
                                height

Pipe any script to phantomic:

phantomic < ./test.js

Opening a file:

phantomic ./test.js

If you are using phantomic from a Makefile with a local install, you will have to include it in the PATH:

BIN = ./node_modules/.bin
PATH := $(BIN):$(PATH)

test:
  browserify ./test.js | phantomic

Debugging

Put a debugger; statement somewhere and run:

phantomic --debug < ./test.js

This will open the WebKit inspector in your browser.

Exit detection

By default, phantomic will report an error if anything was logged to console.error. Program termination is detected by observing delays in the event queue and the last log statement that was received.

To make exit detection more reliable, brout can be used. If brout is part of the given script, run phantomic with --brout to install handlers for the out, err and exit events. Also make sure process.exit(code) is called.

API

You can use phantomic from your own node scripts like this:

var phantomic = require('phantomic');

phantomic(process.stdin, {
  debug : false,
  port  : 0,
  brout : false,
  'web-security': false,
  'ignore-ssl-errors': true,
  'viewport-width': 1024,
  'viewport-height': 768
}, function (code) {
  process.exit(code);
}).pipe(process.stdout);

Run the test cases

npm install
make

Compatibility

  • Node 0.10 or later
  • PhantomJS 1.9 / 2.0

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].