zeek/doc/scripts
Robin Sommer 7cc863c5fc Fix for when not producing local output; that hung.
* origin/topic/robin/dataseries:
  Moving trace for rotation test into traces directory.
  Fixing a rotation race condition at termination.
  Portability fixes.
  Extending DS docs with some examples.
  Updating doc.
  Fixing pack_scale and time-as-int.
  Adding format specifier to DS spec to print out double as %.6f.
  DataSeries updates and fixes.
  DataSeries tuning.
  Tweaking DataSeries support.
  Extending log post-processor call to include the name of the writer.
  Removing an unnecessary const cast.
  DataSeries TODO list with open issues/questions.
  Starting DataSeries HowTo.
  Additional test output canonification for ds2txt's timestamps.
  In threads, an internal error now immediately aborts.
  DataSeries cleanup.
  Working on DataSeries support.
  Merging in DataSeries support from topic/gilbert/logging.
  Fixing  threads' DoFinish() method.
2012-05-17 12:38:47 -07:00
..
bifs.rst Finished dissolving the sphinx source directory into doc/ and doc/scripts/ 2011-11-15 11:52:52 -06:00
builtins.rst Merge remote-tracking branch 'origin/fastpath' 2012-04-09 16:02:10 -07:00
CMakeLists.txt Changes to Broxygen master script package index 2011-12-02 13:59:33 -06:00
DocSourcesList.cmake Fix for when not producing local output; that hung. 2012-05-17 12:38:47 -07:00
example.bro Merge remote branch 'origin/fastpath' 2011-12-18 15:10:49 -08:00
example.rst Distribution cleanup and documentation setupt tweaks. 2011-10-18 12:00:28 -07:00
genDocSourcesList.sh Baseline updates. 2011-10-26 15:27:03 -07:00
index.rst Rearrange packet filter and dpd documentation. 2011-11-30 10:13:20 -06:00
internal.rst Finished dissolving the sphinx source directory into doc/ and doc/scripts/ 2011-11-15 11:52:52 -06:00
packages.rst Changes to Broxygen master script package index 2011-12-02 13:59:33 -06:00
README Add missing doc targets to top Makefile; remove old doc/Makefile. (fixes #705) 2011-12-01 09:16:38 -06:00

This directory contains scripts and templates that can be used to automate
the generation of Bro script documentation.  Several build targets are defined
by CMake and available in the top-level Makefile:

``restdoc``

    This target uses Bro to parse policy scripts in order to generate
    reStructuredText (reST) documentation from them.  The list of scripts
    for which to generate reST documentation is defined in the
    ``CMakeLists.txt`` file in this directory.  Script documentation is
    rebuild automatically if the policy script from which it is derived
    or the Bro binary becomes out of date

    The resulting output from this target can be found in the CMake
    ``build/`` directory inside ``reST`` (a symlink to
    ``doc/scripts/rest_output``).

``restclean``

    This target removes any reST documentation that has been generated so far.

The ``genDocSourcesList.sh`` script can be run to automatically generate
``DocSourcesList.cmake``, which is the file CMake uses to define the list
of documentation targets.  This script should be run after adding new
Bro script source files, and the changes commited to git.

If a script shouldn't have documentation generated for it, there's also a
blacklist manifest that can be maintained in the ``genDocSourcesList.sh``
script.

The blacklist can also be used if you want to define a certain grouping for
the script's generated docs to belong to (as opposed to the automatic grouping
the happens for script packages/directories).  To do that, add the
script's name to the blacklist, then append a ``rest_target()`` to the
``statictext`` variable where the first argument is the source directory
containing the policy script to document, the second argument is the file
name of the policy script, and the third argument is the path/name of a
pre-created reST document in the ``../`` source directory to which the
``make doc`` process can append script documentation references.  This
pre-created reST document should also then be linked to from the TOC tree
in ``../index.rst``.

See ``example.bro`` for an example of how to document a Bro script such that
``make doc`` will be able to produce reST/HTML documentation for it.