WXP version 5
User's Guide

Shell Menu Setup

The WXP User's shell uses a menu to select programs and options.  In order to make the shell more extensible, the menu items and the menus themselves can be changed at any time.  This is done by modifying the "wxp.menu" file located in the WXP database directory (see file_path). This file lists all the menus, the labels used to describe each action and the command to run when the item is selected.  The format of the file is as follows:

   type label command

The type is either a "M" for menu or "I" for item.  The menu type denotes the beginning of a menu listing.  The subsequent lines will be item lines until the next menu line with those items being displayed as part of that menu.

The label is a single string that is used to describe the menu item in more detail than just the command.  This string cannot contain white space so any white space characters must be replaced by underscores "_".  The number of characters is limited to 40.

The command is simply the command to run for that item. It is the command and any command line parameters.  If the item is of type menu, the command becomes the short name of the menu and is used with the "menu name" command to go to that menu.  If the menu item is a reference to a submenu, the command will be "menu name" where name is the short name listed with each menu. The number of characters is limited to 50.

Here is a sample wxp.menu file:

   M   Main                         main
   I   Parsing_Programs             menu parse
   I   Plotting_Programs            menu plot
   I   Contouring_Programs          menu contour
   I   Meteorological_Calculations  menu calc
   M   Parse_Data                   parse
   I   Parse_Raw_Surface_Data       sa_parse
   I   Parse_Surface_Data           sa_parse -if=cvt
   I   Parse_Series_of_Surface_Data sa_parse -nh=-6 -if=cvt
   I   Parse_Upper_Air_Data         ua_parse
   I   Parse_MOS_Air_Data           fo_parse
   I   Parse_Forecasts              forecast
   I   Parse_Text_Data              parse
   M   Plot_Data                    plot
   I   Plot_Surface_Data            sfcwx
   I   Plot_Surface_Meteograms      statlog
   ...

The first menu is always the main menu. Lets break this down:

In this menu, all the items in this menu go to submenus.  Let's look at the first item:

Now if we look at the parse submenu, each item now runs a program.  In some cases, you will notice that command line parameters are specified.  This can be handy if you need to specialize an program for a particular application. This is especially handy in a classroom situation where special commands may need to be easily accessed through the WXP menu.


Last updated June 9, 1998