Time Format in HyperWAG

      Times in HyperWAG can be express in many different formats. These times can be in 24-hour format (military time) or they can be in 12-hour format by appending an "am" or "pm" after the time (you can abbreviate these as 'a' and 'p' respectively). In addition, if no minutes are given, ":00" is assumed. For example:
        Time Meaning
        9:00 Nine o'clock AM
        15:42 Three o'clock PM
        8pm Eight o'clock PM
        8:34am Eight forty-three AM
        17:40am Invalid. The AM is ignored.
        10 10 o'clock AM
      Examples of valid Start Times and End Times are:

      WagaLang Appointment Examples

      Now that we have seen what each part of the appointment line looks like, we can put them together to create a single activity entry. Any number of spaces or tabs can separate each section. Below are some example lines and what they mean.

    MWF 9:30,10:30 Planning Meeting
    sn 1pm,4pm Tennis with Joanne.
    MtH 10,13:45 Lunch
      This defines an appointment that occurs on Monday, Tuesday, and Thursday between 10am and 1:45pm.

      The WagaLang Appointment File
      The WagaLang appointment file is a simple text file consisting of as many appointment lines as you want. (See the preceding section for a description of the appointment lines.) There can be only one appointment per line and each appointment must be on only one line.

      For example, a typical WagaLang appointment file might be:

    MTW 9,12 Chemistry Lab
    TF 12,13 Lunch with Professor Smith
    SN 10,1pm Golf
    H 5:30pm,6:30pm Dinner with the President
      Appointment files can also contain comment lines. These comment lines are not read as appointments and must begin with a pound sign ("#"). For example,
    MTW 9,12 Chemistry Lab
    #For chem lab, must have homework done!
    TF 12,13 Lunch with Professor Smith
    SN 10,1pm Golf
    #Need to work on swing for these reasons:
    # * have a terrible slice
    # * have a bad hook
    # * aim for water
    This is an invalid #comment
    H 5:30pm,6:30pm Dinner with the President
    (comment lines shown in bold)
      Note that a comment cannot appear on the same line as an appointment. If a pound sign is included after the description it is included with the description.

      Entering Appointments with YAWL

      If you choose to enter you appointments in YAWL, you must follow the syntax described below. If you are not already familiar with using WagaLang files as described above in the sections Entering Appointments with WagaLang, WagaLang Appointment Examples, and The WagaLang Appointment File, you should quickly skim those sections because many of the same concepts apply to YAWL.

      First, just like WagaLang files, YAWL files are simple text files into which you write your appointments. The information included is the same as WagaLang files, but the format is different. Just as WagaLang files had three sections, YAWL files have the same three sections: days the activity occurs on, the times when the activity starts and ends, and the activity description. Each of these sections is described individually below, and we see a complete YAWL appointment entry in Example YAWL Appointments.

      Note, unlike WagaLang files, each appointment entry in YAWL files spans several lines. Each section is included on its own line(s).

      The Days Section

      The first part of a YAWL appointment is the days section. This section specifies which days the appointment occurs on. Unlike WagaLang, in YAWL the days are written out as full words separated by commas. For example:

      Monday, Wednesday, Thursday

      The days can be listed in any order and can be written in any combination of upper- and lowercase. In addition, they may be separated by any number of spaces or tabs. For example:

      Friday, Sunday, MoNDaY

      The days cannot be abbreviated in any way. You must enter the full day name. All the days must occur on the same line and nothing but days may occur on this line.

      The Start Time and End Time Section

      The next section (and therefore the next line) of the YAWL file is the Start Time and End Time sections. These sections describe the starting time of the activity and the ending time. The actual times are given in the format described in Time Format in HyperWAG just as they were for WagaLang. The only difference between YAWL and HyperWAG is that the two times in YAWL are separated by a dash ('-') instead of a comma.

      For example:

      10:45-13:00
      9pm-11pm

      The Description Section

      The final section of a YAWL appointment is the description section. Unlike in WagaLang files, the descriptions in YAWL files can (and often do) span many lines. The end of a description is signified by the line %%END-YAWL%%.

      For example:

          Skiing with Bjorne at
          White Mountain's black dimond
          trial. Bring first aid kit!!!
          %%END-YAWL%%
      This is a perfectly valid YAWL description. There is no limit to the number of lines you may include, but your Week At a Glance table might become cluttered if you include too much description.
      Because the special line %%END-YAWL%% signifies the end of a description, it cannot be used in a description. For example:
        Monday,Tuesday
        11:30-12:30
        Lunch with my boos, Mr.
        %%END-YAWL%%
        Smith
      Would be an error. But if your boss' first name is %%END-YAWL%% you have bigger problems than this limitation of YAWL.



      Example YAWL Appointments

      Now that we've seen all the pieces, lets see what full YAWL appointments look like.

          Monday, Tuesday, Sunday
          9:40-10:00
          Very Important CPS Assignment. I must
          work on this until I can know longer feel
          the tips of my fingers because I have done
          soooo much typing.
          %%END-YAWL%%
      YAWL appointments are generally easier to read than their WAG counterparts, but often they are more time-consuming to enter.

      The YAWL Appointment File

      The YAWL appointment file is very similar to the WagaLang appointment file. It consists of as many YAWL appointments as you wish. It can also include comment lines that are ignored by HyperWAG. These lines must start with a pound sign ('#').


    Running HyperWAG
      Once you have created an appointment file, you should run HyperWAG to create the HTML table. To run HyperWAG, change to the directory in which you created the appointment file and type:
      wag

      HyperWAG will prompt you for the name of the appointment file as well as the name of the HTML file you would like to create. HyperWAG will then generate the HTML table and tell you when it is done. HyperWAG will also display error messages if it cannot understand something in the appointment file.

      A typical session with HyperWAG might be as follows: (User input is shown in bold.)

    % wag

    Please type appointment file name: myappts.wag
    Please type name of HTML file to create: thisweek.html
    Change default options? (n) n

    Reading myappts.wag… finished.
    Generating HTML table in thisweek.html… finished.

    HyperWAG is done generating output.

    %

      Alternatively, you can provide the input and output filenames on the command line after the "wag" command. HyperWAG will use these files instead of prompting you for filenames. For example, the command shown below is equivalent to the session above.
      % wag myappts.wag thisweek.html

      In addition to the input and output file, you may specify several options:
      -q Run in quiet mode. That is, don't ask to change user options.
      -h Show the help menu.
      -c Force changing of the user options (that is, assume 'y' to the first question.)
      -t Set the table caption. The next argument must be the text you wish to use as the table caption.
      The options can be combined into one argument, for example:

      % wag -qt "This Long Week" myappts.wag thisweek.html
      means run in quite mode and generate a table from myappts.wag, put it into thisweek.html and use "This Long Week" as the caption.

    Table Appearance
      By now, you should have created a text file with extension "html". This is the file that contains the table that you have just created. In Order to view the table, you would have to either use Netscape or Microsoft Internet Explorer, and it should support HTML version 3 or above, which will be able to display tables. Open this file in your Web browser to view your week at a glance.
      To open a file in Netscape, for example, from the File Menu, choose "Open File in Browser" and select the output file. You should see a table similar to the one below.


      Error Messages

      Below is a list of the error messages that HyperWAG can generate and their causes and solutions.

      no input file specified
      This error indicates that you did not supply the name of your appointment file to HyperWAG. You must either include the input file name on the command line (see Running HyperWAG) or type it at the prompt.

      file does not have required .wag or .yawl extension
      An input file must have the suffix ".wag" or ".yawl" to be correctly read by HyperWAG. HyperWAG uses this suffix to determine which format the file is in. To solve this problem, rename you file using the "mv" command to something ending in either ".wag" or ".yawl".

      empty or damaged file
      This error occurs if their were no activities included in the activitiy file.

      time in wrong format, may be other problem such as wrong order of elements
      The time entered in the appointment file was not understood by HyperWAG. This error is most commonly the result of a typo. Common typos include:

      day in wrong format
      You have entered the days in the wrong format. This error could be a result of a typing mistake. For example, typing "mwd" for the days in a WagaLang file or "Wedensday" in YAWL. This error could also occur if you forgot to begin a comment line with a pound sing ('#'). If you don't include the pound sign first, HyperWAG will attempt to interpret the text as an appointment.

      yawl file doesn't end with %%END-YAWL%%
      The last appointment in the file is missing a %%END-YAWL%% line. You need to add this line to the last appointment.

      Unrecognized option
      You have included an option on the command line that HyperWAG does not understand. Type "wag -h" to see a list of valid options and their functions.

      Too many files on command line
      The command line syntax is not correct. In particular, you have included too many arguments that HyperWAG interprets as file names. The most common cause of this error message is forgetting to put the dash ('-') before any options that are not file names.

      Missing argument for -t: -t table-caption
      You have included the -t option on the command line but have not specified a caption. The -t option allows you to set the table caption from the command line. The argument following the -t must be the table caption. If there are no arguments following the -t option, you will receive this error message.


      Copyright

      This file, its design and layout are copyright (c) 1997 by SRC Software. (Sheng, Ryan, and Carl) CPS 108 Fall 1997, Group 4. HyperWAG is copyright (c) 1997 by SRC Software.

      No animals were harmed in the production of this web page.

      This web page is not endorsed or sponsored in any way by Duke University. The opinions and information expressed within it are those of the copyright holder. All opinions within are correct.

      Credits

      All team members participated in the design and implementation of HyperWAG. In particular, Ryan implemented the Parser, the ParserFactory and the specific parsers for YAWL and WagaLang. Sheng implemented the HTML generation and contributed to many other parts of the design. Carl wrote the Activity and Schedule data structures.

      The animated logo at the top of this page was created in Photoshop by Carl Kingsford.

      [end of HyperWAG on-line manual]