Home

Awesome

node-web-watcher

npm version license build status dependencies status devDependencies status coverage status climate status npm downloads

NodeJS agent that monitors a web page and act upon changes.

Usage

Install CLI globally

npm i -g webwatch

Examples

  1. Monitor news.ycombinator.com for scores update
webwatch text --url https://news.ycombinator.com --query ".score"
  1. Monitor status.github.com for availability changes and send a mail using mandrill
webwatch text --url https://status.github.com --query "#graphs .graph:nth-child(2) .number" --smtp smtps://user%40gmail.com:pass@smtp.gmail.com --from foo@bar.com --to bar@baz.com

Help

$ webwatch --help
Usage: bin/webwatch <command> [options]

Commands:
  raw   Watch a request raw result
  json   Watch a request json result
  html   Watch a request html result
  text   Watch a request text result
  count  Watch a request count result
  sum    Watch a request sum'ed result

Options:
  -u, --url        Url to request                                     [required]
  -q, --query      Query to perform
  -d, --delay      Delay between queries
  -m, --mandrill   Mandrill API key
  -e, --email      Notified email
  -p, --phantomjs  Use PhantomJS
  -h, --help       Show help                                           [boolean]

Examples:
  bin/webwatch html -h http://google.com  Watch google homepage for changes

Contributing

Please submit all pull requests the against master branch. If your unit test contains javascript patches or features, you should include relevant unit tests. Thanks!

Available scripts

ScriptDescription
startAlias of test:watch
testRun mocha unit tests
test:watchRun and watch mocha unit tests
lintRun eslint static tests
compileCompile the library
compile:watchCompile and watch the library

Authors

Olivier Louvignes

Copyright and license

The MIT License

Copyright (c) 2016 Olivier Louvignes http://olouv.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.