Chapter 6 Cows and Cows-mkgen

Table of Contents
6.1 Cows Input Files
6.2 Invoking Cows
6.3 G-Cows and Make
6.4 Invoking Cows-mkgen
6.5 Keeping sources separated
6.6 When Cows-mkgen needs more Hints
6.7 Excluding files and directories
6.8 Branch Sites
6.9 Multilingual Sites
6.10 Fast mode
6.11 Diagnostic Messages
6.12 Security

6.1 Cows Input Files

Cows parses a text file and looks for Cows-tags. Everything outside these tags is sent verbatim to output while everything inside is considered a script (we'll call them Cows-scripts, even if it sounds very silly ...) and executed; everything displayed by the script is sent to output too.

Cows-scripts can be enclosed between two sets of tags:

Cows-tags are case sensitive so you can't type <COWS ... />, <CoWs> ... </ COws> and so on.

You can have more than one script in the same file and Cows will parse them as if they were a whole. As a consequence of this, variables defined within a script will be accessible from other scripts in the same file. Moreover, if you include one or more external files, their Cows-scripts will appear to Cows as if they were typed in the original file. All this will be clearer when we'll talk about variables and file inclusion.

You can also nest these tags without affecting Cows' behavior. This is very important when including external scripts already enclosed between tags.

A sample Cows input file follows:

<html>

<head>
  <title> A sample Cows input file </title>
  <cows>
    // COWS SCRIPT GOES HERE ...
  </cows>
</head>

<body>

  <h1> A sample Cows input file </h1>

  <p> If you pick up a starving dog and make him prosperous,
      he will not bite you. This is the principal difference
      between a dog and a man. <br>
      -- Mark Twain

  <cows>
    // ANOTHER COWS SCRIPT GOES HERE ...
    <cows>
      // THESE NESTED TAGS ARE USELESS BUT HARMLESS.
      <cows /* ANOTHER NESTED TAG */ />
    </cows>
  </cows>

  <p> The wild, cruel beast is not behind the bars of the cage.
      He is in front of it. <br>
      -- Axel Munthe

</body>

</html>

This manual can be downloaded from http://www.g-cows.org/.