Kamajii GUI


Kamajii's GUI is the preferred way to update the configuration files that Kamajii uses to monitor web sites. This document assumes that you have already installed Kamajii.

Table of contents


Running the GUI

To run the GUI, enter the directory in which you have installed Kamajii and run "kam_conf.pl".

System Screen

The system screen is the first thing that Kamajii's GUI displays when it comes up:

System Screen

This screen allows you to configure some general properties of Kamajii:

Cycle Time (seconds)
In each of its cycles, Kamajii checks all the web sites that it is configured to monitor and processes their new information. The amount of time that Kamajii should wait between cycles is configured in the Cycle Time parameter.

Sites Folder
The path to a directory in which Kamajii's site configuration is saved. The path can be relative to Kamajii's root directory.

Output Destinations
The Output Destinations list all the possible ways in which Kamajii can send alerts about the sites it monitors.
Output destinations are simply programs that Kamajii can run that can handle its output. When an output destination is double-clicked, its configuration opens in the right panel. In it, you can configure the command line that is run to send a message.

You can add new destinations by simply clicking on the + icon. The configuration for the new destination will open.

Output Destination Configuration

In the example above, a new output destination called "readit" has just been defined. To complete the definition, you would have to fill the three fields:
In the "readit" example, you could write a command line that runs a (hypothetical) text-to-speech engine that converts the message to text and reads it out loud: text2speech -text $message$ -voice $male_or_female$
This command line allows your users to decide if they prefer a male or a female voice reading their messages for them.
The default output destinations that Kamajii installs with are:
Saving
When you finish editing your configuration, save it by selecting "Save" from the file menu.

Adding Users

Kamajii can monitor sites for multiple users in the same process. Each user has his or her own password and the configurations are encrypted, so users cannot read each others' configurations.

To add a new user to Kamajii, choose File->New->User from the menu. A popup will open and prompt you to enter the user's name, the path for the user's configuration and a password. Once you enter these, the user's configuration will be created.

User Screen

The user screen is where you handle the user-specific configuration. This is where you tell Kamajii which sites you want it to monitor for you. To access the user screen, choose your name from the Configuration->Users menu. You will be prompted for a password, and a screen similar to the following one will open:

User Screen

Messages
On the left of the screen you will see a list of the output destinations that are configured for the system. You can select the ones that you want to have enabled for you by clicking on the box to the left of their names.

After choosing every destination in the list, the screen looks like this:

User Screen

All the destinations that you can use to send messages are highlighted. You can now click on the red links in order to configure your information. This actually configures the user-specific parameters that were defined in the command line of the output destination in the user screen.

An important note regarding Orange: For this provider's official
SMS sending site, you're required to own their phone to complete the
registration for an online SMS sending account. This means two things:

First, if you do not own a phone from Orange you cannot
send SMSs to Orange phones.

The second issue with the official site is that since Orange can "prove" who
sent a message and connect it to your phone bill, they may decide some
time in the future to start charging for these messages. In fact, Orange
charged for this service for a few weeks (10 agorot per message) before
they decided to make the first 20 messages per day free. Sendsms tries
to verify that sending a message is still free (by looking at the text
of the SMS sending pages), but NO GUARANTEE IS MADE by me that your phone
bill does not get charged for the messages you send with sendsms. I
repeat: Orange may charge your phone bill for SMSs you send and sendsms
cannot and will not guarantee that this never happens.
Kamajii uses sendsms to send SMS messages so we do not guarantee that your phone bill does not get charged for the messages Kamajii sends you.
Sites
On the right of the user screen is the list of sites that are defined in your installation of Kamajii. In the installation that is shown in the picture, the sites Grades, Quotes, News and Sports have been defined.
Clicking on the box to the right of a site marks that site to be monitored for you by Kamajii. Sites often require user-specific configuration. This configuration can be accessed by clicking on the site's name. You can also configure, for each site, which of the types of messages that you have selected (on the left) are used. This is done by clicking the site's "[messages]" link.

The user screen with the "Grades" site selected:

User Screen

Choosing "Grades" opens a popup that asks you to fill site-specific information:

Grades Site

Clicking on the [messages] link to the right of "Grades" opens the following popup:

Site messages configuration


Saving
When you finish editing your configuration, save it by selecting "Save" from the file menu.

Default Sites

Kamajii's sites are highly configurable, and you are encouraged to add sites that you find useful using the Site Screen. However, Kamajii installs with a few site configuration files:

FIBI
FIBI is the First International Bank of Israel. Their site is at http://www.fibi.co.il/. If you have an account at FIBI and registered at your bank for a username and password that enable you to log-in and see your bank account online, you can use three configurations to monitor your bank account without opening your browser. In all three configurations, fill your FIBI username in the "username" field and your FIBI password in the "password" field.
Haaretz
Notifies you on the current events from Haaretz news.

Whatsup
Notifies you on linux and open-source news from the Israeli site Whatsup.

TAU
If you are a student at the Tel Aviv University, use this to get notifications whenever you receive a new grade. You will need to fill in your ID number in the "id" field and your password for http://www.ims.tau.ac.il/tal/ in the "password" field.

Quotes
Notifies you on changes in a stock, according to Yahoo! Finance. You will need to fill in the stock's symbol (for example, for Yahoo! fill in "YHOO"), the bottom threshold for the stock (you will be notified when the stock goes under this value) in Minimum_Trade, and the upper threshold in Maximum_Trade.

Galgalatz
Traffic updates from Galgalatz.

Site Screen

This screen is used to define new sites for Kamajii to monitor. It is more complicated than the other screens, so it is recommended that you familiarize yourself with Kamajii using the default sites before delving into creating new ones.

Still here? Very well then..

A site definition is divided to the parameter definitions and the page definitions. Parameters are inputs that are different for different users. For example, password or username. Everyone who uses the site you define will be required to fill in these parameters. The pages define the flow of the site - which pages Kamajii needs to request and what it needs to do with them.

Parameter Definitions
Parameter Screen

The image above shows the list of parameters for the site fibi-Balance-Changes. Double-clicking on a parameter will open its configuration details:

Min_Yitra parameter

As you can see, there are two types of parameters:
Page Definitions

Clicking on the "Pages" tab brings you to the Page Definition screen:

Pages

Here you can see the pages of the fibi-Balance-Changes. Kamajii will request the pages in the order they are written. The buttons above the list allow you to add, rename and delete pages, and to move them up or down in the list. Double clicking on a page name shows you the page definition. For example, double-clicking on "balance_page" will show the following:

balance_page: Request definition

As you can see, a new set of tabs has opened to the right of the screen. Each tab allows you to define a different set of properties for the page.

Before entering all the possible configuration options, the following general rule works in pretty much every field: Entering the name of a parameter that is already defined, surrounded by $ signs, into a string, will replace the parameter's name with its value. For example, if you define a parameter "name" with the value "Herman", the string "My name is $name$" will be replaced with "My name is Herman". In the next sections you will see several examples of where this behavior can be useful.

Request

Note: Whenever a "URL" or an "HTTP Request Content" item contains a reference to a predefined list parameter (of size N), the current HTTP request is sent and processed N times, each time using a different element from the list. In case more than one list is referenced in "URL" and "HTTP Request Content", all these lists, which are assumed to be of the same size, are scanned that way.

Reply
Error Handling
Content Parameters
This section lists the parameters that can be defined based on the content of the request.
The following types of parameters are defined:

Regex

Regex Param
Regex parameters search for a regular expression on the contents of the reply, and save its results.
Table

Table Param
Table parameters search for HTTP tables in the contents of the reply and return some of their rows and columns.
DB
DB param
DB parameters load the values of parameters that were saved to the database in the previous run.
Differences
Differences are your way to check for changes in the page, which will trigger alerts.
This is the Differences tab of fibi-Balance-Changes:

Differences Tab

The list on the right of the screen is a list of the differences to be checked. New ones can be added by clicking +, existing ones can be deleted by clicking x. To edit a difference, double-click it. The following popup will open:

Diff Yitra

After you finish defining the site, save it from the File menu. Your users can then be notified on these pages.
Also, please consider sharing the site configurations with other people. The site configuration files can be found in the sites directory under your installation of Kamajii. If you email them to the Kamajii team, we will be glad to post them on the Kamajii site.

Note that the term "row" mentioned in the Differences section, has two meanings:

1) When the checked item is a list, "row" refers to one of the list's elements. Such a "row" contains only one column - the scalar value itself.

2) When the checked item is a table, "row" is a regular row in a table. Such a "row" can contain any number of columns.