web-watcher
v0.5.1
Published
NodeJS Web watcher tool
Downloads
19
Readme
node-web-watcher
NodeJS agent that monitors a web page and act upon changes.
Usage
Install CLI globally
npm i -g webwatch
Examples
- Monitor
news.ycombinator.com
for scores update
webwatch text --url https://news.ycombinator.com --query ".score"
- 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:[email protected] --from [email protected] --to [email protected]
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
| Script | Description | |----------|-------| | start | Alias of test:watch | | test | Run mocha unit tests | | test:watch | Run and watch mocha unit tests | | lint | Run eslint static tests | | compile | Compile the library | | compile:watch | Compile and watch the library |
Authors
Olivier Louvignes
- http://olouv.com
- http://github.com/mgcrea
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.