Table of Contents

Name

codex - the Code Extractor configuration file format

Synopsis

<?xml version="1.0" encoding="UTF-8"?>
<config version="1.0">
  <code>style</code>...
  <caption>style</caption>...
  <prefix>text</prefix>
  <extension>text</extension>
  <file-tag>text</file-tag>
  <snippet-prefix>text</snippet-prefix>
  <snippet-extension>text</snippet-extension>
  <comment-end>text</comment-end>
  <comment-start>text</comment-start>
  <doxygen />
</config>

Description

The configuration file for codex(1) is an XML document that contains a single <config> element. You must supply the version attribute with a value of "1.0". The config element contains the following subelements in any order. White space is not significant before the start of an element or after the end of an element, but within a text element, every character counts.
<caption>
Names a caption style. Use multiple caption elements to name multiple caption styles. Each code listing starts with a paragraph that uses a caption style. Subsequent code paragraphs form the body of the listing. If you list no caption elements, codex produces only snippets and never listings.
<code>
Names a code style. You need at least one code element in the configuration file. A listing or snippet is a series of adjacent paragraphs with a code style. Different code styles can apply to different paragraphs in a single listing or snippet. The listing or snippet ends with a paragraph that has a non-code style.
<comment-end>
This optional tag specifies a string to end comments. You must also supply a <comment-start> tag. When printing comments, codex always starts a new line after the end of a comment. Thus, if a comment has only a start string (e.g., # in Perl or shell scripts, // in Java and C++), you can omit <comment-end>.
<comment-start>
This optional tag specifies a string to start comments. If a configuration has a comment string, each listing file starts with a comment that contains the listing's caption.
<doxygen />
If you use this tag, each file starts with a doxygen @file or \file tag before the caption. The tag is followed by the name of the listing or snippet file. If you are using doxygen, javadoc, etc., be sure to specify a suitable <comment-start>, e.g., /** instead of /*.
<extension>
This optional tag specifies the default file name extension for code listings.
<file-tag>
Specifies the text of the doxygen @file tag. The default is @file. I cannot think of any reason ever to change this, but I included this tag in case you can think of a reason.
<prefix>
This optional tag specifies the default file name prefix for code listings.
<snippet-extension>
This optional tag specifies the default file name extension for code snippets.
<snippet-prefix>
This optional tag specifies the default file name prefix for code snippets.

Files

The following directories and files are significant:
configschema.rng
This relax-ng schema defines the format of the configuration file. You can find this file with the other files that accompany this program, such as README.
/usr/local/lib/codex
The default directory where configuration files are stored.
default.xml
The default configuration.
apress-cpp.xml
A configuration for the Apress style sheet. The file names and comment text are suitable for C++.
apress-cpp-dox.xml
A configuration for the Apress style sheet. The file names and comment text are suitable for C++, enabled for doxygen.
apress-java.xml
A configuration for the Apress style sheet. The file names and comment text are suitable for Java.
apress-javadoc.xml
A configuration for the Apress style sheet. The file names and comment text are suitable for Java and javadoc.
apress-perl.xml
A configuration for the Apress style sheet. The file names and comment text are suitable for Perl.
oreilly-cpp.xml
A configuration for the O'Reilly style sheet. The file names and comment text are suitable for C++.
oreilly-cpp-dox.xml
A configuration for the O'Reilly style sheet. The file names and comment text are suitable for C++, enabled for doxygen.
oreilly-java.xml
A configuration for the O'Reilly style sheet. The file names and comment text are suitable for Java.
oreilly-javadoc.xml
A configuration for the O'Reilly style sheet. The file names and comment text are suitable for Java and javadoc.
oreilly-perl.xml
A configuration for the O'Reilly style sheet. The file names and comment text are suitable for Perl.

Author

Ray Lischner (codex@tempest-sw.com)

See Also

codex(1), doxygen(1), javadoc(1)


Table of Contents