Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tell_me_when

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tell_me_when

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

TellMeWhen

Description

This is a small simple application that displays a popup if a css or xpath selector is present on a page (and possibly if the text inside that selector matches something). I built it so that you can put it into your cron file if a site is in maintenance mode or to check on a status page so that you can tell when the status is good or bad. My usage is to add this to a crontab file with crontab -e then follow the advice in Usage, example:

* * * * * export DISPLAY=:0 && tell_me_when -x -d https://status.github.com/ '//*[@id="message" and @class="good"]'

this example checks the github status page every minute and will pop up a notice if the services are down (because there will not be an element that has id message and class good)

Features/Problems:

  • Recognises css or xpath
  • Only tested on linux
  • Open an issue if you have a feature you would like to add.

Usage

From the docstring:

Usage:
  lib/tell_me_when.rb [--css | --xpath] [--appears | --disappears] [--matches=<regex>] <site> <path_to_element>
  lib/tell_me_when.rb -h | --help
  lib/tell_me_when.rb --version

Options:
  -h --help                      Show this screen.
  --version                      Show version.
  -c --css                       Search by css
  -x --xpath                     Search by xpath
  -a --appears                   Display when value appears
  -d --disappears                Display when value disappears
  -m=<regex> --matches=<regex>   Display only if the element matches the regex

Example usage:

tell_me_when.rb -x -d https://status.github.com/ '//*[@id="message" and @class="good"]'
tell_me_when.rb -c -a --matches="10.*" https://status.github.com/ "#graphs > div:nth-child(2) > div.data > span"

Install

Install in the usual way, like so:

gem install tell_me_when

Developers

To install dependencies and run tests just do the following:

bundle
rake test

The code should be quite straight forward, open an issue if anythings unclear and I'll be happy to help

Contributing

Any contributions very much appreciated

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
  6. Celebrate you awesome Pull request, by god you are classy.

License

(The MIT License)

Copyright (c) 2014 FIX

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.

FAQs

Package last updated on 06 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc