1.0 What is chichot? Chichot is an agent software that assists the user throughout the interaction with the xterm session. In this case the word agent should be taken as a personal assistant. Chichot learns from the user and follows the changing context of interaction, providing the user with previously defined macros and actions in those contexts. Hopefully, using this tool will allow to reuse patterns of interactions of a single user, as well as allow sharing them between different users. 2.0 Basic concepts. context - words/phrases that uniquely define the sematics of the current interaction, trigger - an output string that causes a change of the current context macro - a string with a name that can be invoked (input and output) that doesn't assume any interaction with the underlying application action - an interactive procedure that is able to sychronize with the underlying application 3.0 Programming. One programs by defining contexts, triggers, macros, and actions. I will focus only on defining actions, since other things are relatively simple. SCREEN AREA SELECTION Can be relative to the cursor (Area) or absolute (Row). Selected area, can be saved, retrieved, or compared to a string. The whole screen can be saved and retieved (Dump). TEXT AND PATTERN SEARCH You can search for sequences of words, numbers, and characters (SEARCH), as also for 2D patterns (Pattern). When you specify a pattern, '#' character is used to mark "don't care" positions. SPECIFYING TIMEOUTS Specifying timeouts used as a default later (Standard), or one time values (e.g. before issuing a command that is known to have weak response time) is possible. The two values - arrival and interarrival - describe the characteristics of the application's response, e.g. ftp might have high connect time - 20s, but later the data comes in chunks every 200ms. Defining those values allows predicting the amount of time to wait before declaring the end of output. NUMBER OF KEYWORDS An approximation of the number of keywords can be compared to the supplied threshold. NUMERIC FIELDS After selecting an area you can check whether it is an unsigned integer. You can also assert that the value is in some relation with the threshold. GENERAL DIRECTIONS FOR USING CONDITIONAL OPERATIONS When defining an action specify the assertion that is currently true. Later, an invoked action will ask you to provide an alternative if the condition is not true, e.g. when you are searching for a pattern on the screen make sure this pattern is really there. DEFINING ALTERNATE ACTIONS If the assertion is not true, a window should pop up asking you to confirm the beginning of a definition of an alternate action. After you confirm, chichot goes into recording mode, just like before when you were defining an action initially. With time you can refine your actions. After you are done defining an alternate action, select Action/Record/End. Next time the assertion is not true, the just defined alternate action will be invoked automatically, without requiring your intervention. 4.0 Uses. Since chichot can work with any terminal application, the possibilities are limitless. Let me just mentioned several uses that I have though about: - IRC monitor - monitor IRC channels, and send screen dumps over e-mail when the number of keywords on the screen is higher than some threshold, - play games - finally get your name on the top of score list on all machines on the network, - tutor for Unix beginner - define error messages as triggers that take the user to a specially defined contexts where defined macros print hints, explanations, and encouragement messages. - ... 5.0 License. GNU Public License - "tool is free, what you develop with it, does not necesarily have to be free", so if you set up a macro and action repository you can charge for your effort. In case the need arises, I intend to set up a free repsitory. 6.0 Install Edit chichotConfig.C and customize it to suit your needs. Also, edit the appropriate Makefile, and correct, if necessary, locations of different libraries. 7.0 Running Set your TERM environment variable to vt100. Typing chichot at the shell prompt should be enough to get the interface started. Make sure that the initial text widget named Contexts contains exactly one space before trying to define any context changes. Now - very important step - tell chichot what your shell prompt looks like. To accomplish that choose Context/Change from the menu, in the Add contexts text widget enter "shell" (without enclosing double quotes), and specify your prompt string, e.g. what works for me is "\n% " (again, without enclosing double quotes). Then press OK button (those red lights on radiobuttons are special context components that allow earlier than usual termination of wait for the end of output). After that pressing Enter on the keyboard should cause different things to be displayed on the interface. 8.0 Main future directions. - right now the end result depends on the history of interactions, I will work on allowing the user to interactively reprioritize clustered sets of conditions/assertions (much like it is done with rules in expert systems). - background execution - with kibitz it would still be possible to contact the user and request alternate action, - more robust pattern recognition features - right now a pattern is a contiguous area, and you cannot really relate two distant things that will be needed for determining more complex relationships between patterns, - APPLICATIONS, - ASCII interface, so chichot could work on a plain terminal - if I see a real need (actually you can theoretically do it right now, but I wouldn't recommend it - it is really hard to determine what state you are in without any feedback), - more platforms, - more terminal types, - more screen control sequences taken care of, - more comments, - more efficient and readable code, - new features as a response to your comments. Cheers, ----------------------------------------------------------------------------- Zbigniew Wieckowski, Department of Computer Science, University of Minnesota, 200 Union St. SE, MN 55455, U.S.A., (612)626-0817, e-mail:wieckows@cs.umn.edu ----------------------------------------------------------------------------- What is mind? No matter. What is matter? Never mind. ----------------------------------------------------------------------------- -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.2 mQCNAy7WpFwAAAEEALGC/QVDso78xCGlFKlgUp/+gPDWxDaQZVcZf+Emv5eZzUiK tiFkz/7PWp6Lp2bVrKZup+LAZMDeCnqxGAQOMYjDFBoUB9w3WyMVMClhUkrChPIO REQR3dlF1PWUXw9XyxoWPbByBUR/ZSW3L9OESgfSHBZfL9TrXwor/R8y3/ApAAUR tClaYmlnbmlldyBXaWVja293c2tpIDx3aWVja293c0Bjcy51bW4uZWR1Pg== =049+ -----END PGP PUBLIC KEY BLOCK-----