WatzNew - Documentation

WatzNew Logo
www.watznew.com
Documentation

WatzNew Documentation

Please read this documentation carefully because it can answer many of your questions. If you still can't solve the problem, don't hesitate to contact us by e-mail (support@watznew.com). Bug reports and suggestions are welcome too.

Table of contents

Getting started

· | What can WatzNew do?
· | What are channels?
· | How can WatzNew notify me about changes?

Search patterns & message templates

· | Search pattern and message template macros
· | Complex example of using search patterns

Making your site WatzNew-compatible

· | Step-by-step example

© 1999 A.I.Studio
All rights reserved

All comments send to
info@watznew.com
Tip


WatzNew - Making your site WatzNew-compatible

Documentation

Making your site WatzNew-compatible

Since WatzNew uses it's own message format, you can make your site WatzNew-compatible by creating an additional html file with such a message and including channel definition in index.html or similar base html file of your site.

Let's see how to do it.

Example

Assume you own a site www.mysite.com and the default (base) page is index.htm.

1) Create the text file, i.e. watznew.txt which consists of:

<!-- WatzNew message: Hello, world! -->

"Hello, world!" is your message that your customers will see when they add your channel to list. After all, simply edit this message and it will be visible to everyone next time they check the channel for updates.

2) Upload watznew.txt to your site so it could be accessible as http://www.mysite.com/watznew.txt.

3) Launch WatzNew and click on the [Add New Channel] button. Select "Setup a new http channel" and click [Next]. Enter "http://www.mysite.com/watz new.txt" in the input box and click [Next] again. After the page is loaded, enter other channel parameters such as title, notify mode, refresh period, etc.

4) Once the channel is created, select it from list and press [Channel Properties] button. Channel Properties Window should appear. Switch to "Actions" tab, select "Go To Web Site" action and change "Command to execute" field to http://www.mysite.com/. Click [OK] to save changes.

5) Export your channel (press [Ctrl]+[E]) to file, i.e. 'mysite.wn'.

6) Open your index.htm file and mysite.wn in your html or any text editor.

Your mysite.wn file will look something like that:

[MySite Channel Title]
Type=HttpDocument
NotifyMethod=PopupWindow
NotifySoundOn=1
Host=www.mysite.com
Path=watznew.txt
DocumentCRC=-849339723
Interval=1
IntervalUnit=2
DefaultActionIndex=1
Action1Name=Go To Web Site
Action1Type=CustomCommand
Action1Command=http://www.mysite.com/
Action1Invisible=0
Action1AutoRun=0

Copy this entire text and paste it in your index.htm as shown below:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<HTML>
<HEAD>
<TITLE>My Site</TITLE>
</HEAD>

<!-- WatzNew channel:

[MySite Channel Title]
Type=HttpDocument
NotifyMethod=PopupWindow
NotifySoundOn=1
Host=www.mysite.com
Path=watznew.txt
DocumentCRC=-849339723
Interval=1
IntervalUnit=2
DefaultActionIndex=1
Action1Name=Go To Web Site
Action1Type=CustomCommand
Action1Command=http://www.mysite.com/
Action1Invisible=0
Action1AutoRun=0

-->

<BODY>

...

Grayed text is the original code of your index.htm file.

Note that you can insert more than one channel definition in html file. But for each channel you must create the separate html file with WatzNew message.

7) Upload index.htm to your site.

That's all!

Now, when a user decides to add a channel, he will only need to enter your web site address in WatzNew Channel Wizard (as you did a few minutes before). Then he will see a list of your channels, select one of them and click [Next]. The channel will appear in his list immediately.

To send your customers a message just edit watznew.txt file and upload it to your site.

Table Of Contents

© 1999 A.I.Studio
All rights reserved

All comments send to
info@watznew.com
Tip


WatzNew - How can WatzNew notify me about changes?

Documentation

How can WatzNew notify me about changes?

When your channel is updated (you've got new mail or the message is changed), WatzNew will notify you about this. There are several notification methods you can choose for any channel. These are:

· | ¡Silence (no action): Simply no action is performed.
· | ¤Flashing tray icon: The icon tray flashes. The type of icon ( [image] "channel" or [image] "letter") depends on the type of channel that caused icon to flash.
· | ¡Popup window: The Alert window with the channel title and the new message comes up.

Here is how the Alert Window looks like:

There are additional options you can set for each channel:

· | þ Play sound: The sound (WAV-file) associated with the current channel type is played additionally.
· | þ Alert on errors: When an HTTP error occurs during the channel check, the alert box is displayed with the HTTP error code. This can be useful to be notified immediately when the page has been moved (HTTP error codes 3xx) or deleted from server (HTTP error code 400).

Table Of Contents

© 1999 A.I.Studio
All rights reserved

All comments send to
info@watznew.com
Tip


WatzNew - Search pattern and message template macros

Documentation

Search pattern and message template macros

WatzNew utilizes a simple to create yet powerful search pattern scheme to retrieve specific data from html pages. When the data is retrieved, WatzNew takes the message template to form a user-friendly message.

Search pattern macros

· | {*} means 'any text'.
· | {%} means 'next parameter'.
· | {%,N} means 'next parameter takes exactly N following characters'.

Message template macros

· | %1 means 'the first parameter'.
· | %2 means 'the second parameter'.
· | %3 means 'the third parameter'.
· | ...
· | %N means 'the N-th parameter' and so on.
· | \n means 'new line' (line break).
· | <BR> means 'new line' (same as \n).
· | <LI> means 'new list item' (the text after this macro appears on the next line indented and marked with a bullet).
· | <B>...</B> make the text inside appear as bold (like in html).
· | <I>...</I> make the text inside appear as italic.
· | <U>...</U> make the text inside appear as underlined.

Date / Time macros

These macros can be used in both search pattern and message templates. They are case-sensitive:

· | %Y - 4-digit year value.
· | %YY - 2-digit zero-padded year value.
· | %M - month value.
· | %MM - 2-digit zero-padded month value.
· | %MMM - short month name ('Jan', 'Feb', etc.).
· | %MMMM - full month name ('January', 'February', etc.).
· | %D - day value.
· | %DD - 2-digit zero-padded day value.
· | %W - 1-digit day of the week value (1 — Sunday, 2 — Monday, ..., 7 — Saturday).
· | %WW - 2-digit day of the week value (1 — Sunday, 2 — Monday, ..., 7 — Saturday).
· | %WWW - short day name ('Sun', 'Mon', etc.).
· | %WWWW - full day name ('Sunday', 'Monday', etc.).
· | %w - 1-digit day of the week value (1 — Monday, 2 — Tuesday, ..., 7 — Sunday).
· | %ww - 2-digit day of the week value (1 — Monday, 2 — Tuesday, ..., 7 — Sunday).
· | %h - hour value.
· | %hh - 2-digit zero-padded hour value.
· | %m - minutes value.
· | %mm - 2-digit zero-padded minutes value.
· | %s - seconds value.
· | %ss - 2-digit zero-padded seconds value.

You can add prefixes to the date / time macros. These are case-sensitive:

· | Msg - for the message date / time.
· | Last - for the last check date / time.

This means that if you use %MsgY, the message date's year value will be used;
%LastDD — last try date's day value will be used and so on. With no prefix, the current date and time are used.

Simple example

When the html page is loaded, WatzNew applies the search pattern first. The date / time macros are inserted before the search is performed, so you can make date-based search.

Sample search pattern:

<H1>{%}</H1>

This means: find the first occurence of <H1> in the html document and treat any text between it and the following occurence of </H1> as the first parameter (that corresponds to %1 in message template).

Then the found parameters are inserted in the message template.

Sample message template:

Current article: %1

This means: substitute %1 with the first parameter found.

If we apply the above rules to the following sample html document

...
<BODY>
<H1>"How to become rich?" by John Poor</H1>
...
</BODY>

we will get "Current article: "How to become rich?" by John Poor" message.

Now, when the text between <H1> and </H1> is changed, we will be notified with such a message as soon as WatzNew checks the channel for updates.

Note: Pattern search is case-insensitive but date / time macros that are inserted before search, are case-sensitive; each found parameter is processed on the following scheme: html tags (simply all text between < and >) are stripped; all &nbsp; are converted to spaces; all &nn; and &nnn; and such codes as &copy;, &reg;, &quot; are converted to corresponding characters; the resulting strings are trimmed (all leading and trailing spaces and control characters are removed).

Please look at more complex example of using search patterns and message templates.

Table Of Contents

© 1999 A.I.Studio
All rights reserved

All comments send to
info@watznew.com
Tip


WatzNew - Complex example of using search patterns

Documentation

Complex example of using search patterns

This example will show you the power of WatzNew. Assume we have the following html page and want to track new releases of software called ABC Html Colorizer.

...
<BODY>

<H1>ABCSoft. Our software:</H1>

<H2>ABC E-mail Checker</H2>
<UL>
<LI>Latest release date: 01-Apr-1999
<LI><A HREF="abc_checker.zip">Download v.1.15 now!</A> - 433 KB ZIP archive
<LI><A HREF="abc_checker_help.zip">Help file in .HLP format</A> - 39 KB ZIP archive
</UL>

<H2>ABC Html Colorizer</H2>
<UL>
<LI>Latest release date: 03-Apr-1999
<LI><A HREF="abc_htmlcolor.zip">Download v.1.30 now!</A> - 172 KB ZIP archive
<LI><A HREF="abc_htmlcolor_help.zip">Help file in .HLP format</A> - 60 KB ZIP archive
</UL>

...
</BODY>

Our search pattern would be:

<H2>ABC Html Colorizer</H2>{*}<LI>Download v.{%}now!

This means:
· | find the first occurence of <H2>ABC Html Colorizer</H2> in the html document;
· | skip any number of characters until the <LI>Download v. substring is found;
· | treat any text between it and the following occurence of now! as the first parameter (that corresponds to %1 in message template).

and the message template would be:

Current version of ABC Html Colorizer is %1

If we apply the above rules to our html document we will get "Current version of ABC Html Colorizer is 1.30" message.

And what if we want to track not only the software version but the release date and ZIP file size? Let's modify our search pattern:

<H2>ABC Html Colorizer</H2>{*}<LI>Latest release date:{%}<LI>Download v.{%}now! -{%}ZIP archive

This means:
· | find the first occurence of <H2>ABC Html Colorizer</H2> in the html document;
· | skip any number of characters until the <LI>Latest release date: substring is found;
· | treat any text between it and the following occurence of <LI>Download v. as the first parameter (that corresponds to %1 in message template);
· | treat any text between <LI>Download v. and the following occurence of now! - as the second parameter (%2 in message template);
· | treat any text between now! - and the following occurence of ZIP archive as the third parameter (%3 in message template).

So, we must eventually get the release date, version and file size in %1, %2 and %3 parameters respectively. Let's modify our message template:

Current version of ABC Html Colorizer is %2 (%3), released on %1

If we apply the above rules to our html document we will get "Current version of ABC Html Colorizer is 1.30 (172 KB), released on 03-Apr-1999" message.

Table Of Contents

© 1999 A.I.Studio
All rights reserved

All comments send to
info@watznew.com
Tip


WatzNew - What are channels?

Documentation

What are channels?

WatzNew uses three types of channels:

· | Http channels (or simply channels): These are channels that retrieve data from any text document (plain text files or html pages) that can be accessed by http protocol (with your browser, in other words). You can use proxy servers and retrieve documents from password-protected server areas. Once a document is downloaded, WatzNew applies a user-defined search pattern to it and retrieves some specific data (software version, weather parameters, latest guestbook entry message, etc.) and uses a message template defined for that channel to form a user-friendly message. See Search pattern and message template macros for more info.
· | Perl-script channels: These are channels that collect the perl script output messages and present them in a friendly way. Perl scripts can be used to load local files, run any programs, access documents via any network protocol (http, ftp, nntp, etc.) and so on. To run scripts you need to have Perl 5.003 or greater installed on your machine. You can download the latest Perl version at http://www.activestate.com/ActivePerl/ for free.
· | Mailboxes: These are channels that retrieve the infromation about incoming mail from your POP3 mail servers. They can't work with web-based mail accounts such as Hotmail (you still can create perl-script channels that can access the web-based mail accounts).

You can define up to 10 custom actions for each channel. The maximum amount of channels is 300. You can define any check interval from 1 minute to 99 months for each channel.

Table Of Contents

© 1999 A.I.Studio
All rights reserved

All comments send to
info@watznew.com
Tip


WatzNew - What Can WatzNew Do?

Documentation

What Can WatzNew Do?

What can WatzNew do?

WatzNew uses a simple yet powerful search patterns to retrieve specific protions of information from web pages. That's why WatzNew can be successfully used for:

· | Tracking new software releases: You can setup channels that will monitor the updates of your favourite software. Imagine that you will get the message, i.e. 'New version of Winamp (2.23) released' immediately after their site have been updated!
· | Tracking your web site statistics: There are text-based tracking services such as eXTReMe Tracking that WatzNew can support. You will have the ability to track your visitors, referrers and any other parameters these services can provide, in realtime!
· | Tracking stock quotes: Choose any service on the net that provide you the stock data, and you will be able to track stock quotes without a single click! Note that WatzNew can retrieve data from password-protected sites and work with password-protected proxy servers and firewalls. An exellent tool for those who want to save their time and money.
· | Monitoring weather: Exactly as in the case of stock quotes or stats, WatzNew can monitor your local weather conditions. You can define your own format of reports. The information will allways be at your fingertips.
· | Monitoring mailboxes: WatzNew can check any amount of POP mail accounts. You won't need any other notification tool from now.
· | Doing anything Perl can be used for: WatzNew has the ability to execute Perl scripts and present the output messages in a friendly way. As you know, Perl is an exteremely efficient language for working with text sources. If you are familiar with Perl, you can create WatzNew channels that will work with ftp and news servers, web-based e-mail accounts, generate extensive statistics and do almost anything you could ever imagine! WatzNew is an excellent tool for advanced users.

WatzNew is a very customizable utility. You can change it's appearance, fonts sizes, colors in any way you like. You can create several different schemes and switch between them with a few clicks. The message templates are individual for each channel and are customizable too. You can make the portions of the message bold, italic, underlined, you can create lists and insert line breaks.

You can setup custom actions for each channel. Actions can depend on parameters retrieved by the search patterns. With the aid of these actions you will be able to:

· | Automatically send messages via e-mail: Yes, you can make WatzNew automatically send the messages to you by e-mail (with the help of third-party programs). Some companies offer the ability to redirect e-mail messages to cellular phones or pagers. Get your stock quotes or weather forecast right on your pager!
· | Launch any external programs: Basically, WatzNew can launch any external program with the variable parameters retrieved from the web page upon an event. Feel the power of WatzNew!

Table Of Contents

© 1999 A.I.Studio
All rights reserved

All comments send to
info@watznew.com
Tip