Giter VIP home page Giter VIP logo

dinnerplate's Introduction

dinnerplate

Description

This is a python app to monitor some web page containing static content thats not supposed to change. To use this, run it with the name of the control page as the first parameter and the second parameter should be the test page thats being evaluated. At the moment only <li>, <title>, <div>, <link> and <span> are checked by default, but its trivial to add check for more html tags.

Docs

Sample session

$ python dinnerplate.py  --test http://www.example.com   --control ok.html --notify [email protected] 
$ 

No news is good news, if the page had an alien edit (addition or removal,)

$ python dinnerplate.py  --test http://www.example.com   --control ok.html  --notify [email protected]
 here lies the culprit <li class="top"><a href="#Top" title="Back to Top">Top</a></li> thats been added
$

The application goes through the page and identifies all the elements that have beed added /removed and prints(+/emails) out what it finds.

###NB: this is a blocking app, it will hold the terminal till you hit Ctrl-C later i will turn it into an init.d service. by default, but see below on turning it into a service.

Automating

Requirements:

To run this create a python file names defaults.py and in it place the default values that you use in this format

myurl = 'http://example.com'
myokfile = 'ok.html'
myemail = ['[email protected]','[email protected]']

The app can be configured to be an init.d service on systems with lsb not rh-lsb, all that should be done is:

  1. edit the path to the dinnerplate.py script in the shell script named dinnerplated and
  2. alter the path to your python executable in dinnerplate.py,
  3. copy the dinnerplated file to (typically) /etc/init.d/ you can then start the service with the command service dinnerplated start or the other usual options.

##Convenience You can create a control file using the hotpot.py script:

$ python hotpot.py --control='http://example.com' >> ok.html

Bugs:

Its not perfect, seems to have a bug, the user must be in the directory where the python scipts are, as well as the control html document before it works properly.

More to come,

i hope to add more functionality, docs and clean up the code Cheers mike

dinnerplate's People

Contributors

mike4999 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.