Webnotify Project Webpage

Home Download Install Usage Tutorial Contact/About

Usage

Usage of webnotify is quite simple, to add a web site simply do:

$ ./webnotify --interactive -a teste1

Using --interactive will make webnotify prompt the URL, Execution command, a regular expression filter (if any) and how to check. If you dont use --interactive command line argument, you'd have to specify the url trought the command --url (eg. --url=http://www.google.com).

webnotify v1.0, Copyright (C) 2006 Jean Francois Mouzinho
webnotify comes with ABSOLUTELY NO WARRANTY; This is free
software, and you are welcome to redistribute it under
certain conditions. Read COPYING file for more details.

URL: http://webnotify.sourceforge.net/
EXEC: your_script_or_program some_arguments
FILTER (if none, type return):
How to check? (c=Crc32, l=Last-Modified): c

At this moment the site wans't checked yet, so no checksum is set as we can see with the command (-l, or --list):

$ ./webnotify -l
webnotify v1.0, Copyright (C) 2006 Jean Francois Mouzinho
webnotify comes with ABSOLUTELY NO WARRANTY; This is free
software, and you are welcome to redistribute it under
certain conditions. Read COPYING file for more details.

Name: teste1 [Active]
Url: http://webnotify.sourceforge.net
Exec: your_script_or_program some_arguments
Last change:
Check type: CRC32
Filter:

Also notice that the website has a flag, [Active], you can toggle this flag using the command toggle (-t or --toggle).

To make webnotify check for teste1 website, we call it with the command checkup (-c or --checkup):

$ ./webnotify -c teste1
webnotify v1.0, Copyright (C) 2006 Jean Francois Mouzinho
webnotify comes with ABSOLUTELY NO WARRANTY; This is free
software, and you are welcome to redistribute it under
certain conditions. Read COPYING file for more details.

Warning: First time checkup on teste1 website, will not execute its command.

As you can see, since the site was not checked before, it will not execute the trigger command. Giving a name of web site after -c argument will make webnotify check only that web site, if you dont give any web site name, it will check all the web sites in the list that have active flag.

It might happen that the site has some content that is always updated when you load the web page, to check what content is changing (so you can build the regular expression for erasing this string before crc32 checksum) do like this (the webentry name is 'dirtyWebSite'):

$ ./webnotify -vc dirtyWebSite
webnotify v1.0, Copyright (C) 2006 Jean Francois Mouzinho
webnotify comes with ABSOLUTELY NO WARRANTY; This is free
software, and you are welcome to redistribute it under
certain conditions. Read COPYING file for more details.

(...lots of verbose listings... )

dirtyWebSite was updated! executing the command...

$ mv crc32_file_dump A
$ ./webnotify -vc dirtyWebSite
webnotify v1.0, Copyright (C) 2006 Jean Francois Mouzinho
webnotify comes with ABSOLUTELY NO WARRANTY; This is free
software, and you are welcome to redistribute it under
certain conditions. Read COPYING file for more details.

(...lots of verbose listings... )

dirtyWebSite was updated! executing the command...

$ mv crc32_file_dump B
$ diff A B

diff should output the differences of the two downloaded websites, using that information you can build a regular expression filter to remove that part of the website before the crc32 calculation.

To change the filter of dirtyWebSite webentry do:

$ ./webnotify -e dirtyWebSite --filter="your_regexp"

The crc32_file_dump is only created if you specify -v command line argument. Also it outputs some useful information in case something goes wrong.