[Zodb-checkins] CVS: Zope/lib/python/ZConfig/doc - xmlmarkup.perl:1.2.2.1 xmlmarkup.sty:1.2.2.1 .cvsignore:1.2.58.1 Makefile:1.4.6.1 zconfig.tex:1.47.2.1
Chris McDonough
chrism@zope.com
Mon, 13 Jan 2003 20:18:04 -0500
Update of /cvs-repository/Zope/lib/python/ZConfig/doc
In directory cvs.zope.org:/tmp/cvs-serv6546/doc
Modified Files:
Tag: chrism-install-branch
.cvsignore Makefile zconfig.tex
Added Files:
Tag: chrism-install-branch
xmlmarkup.perl xmlmarkup.sty
Log Message:
Merge ZConfig from HEAD.
=== Added File Zope/lib/python/ZConfig/doc/xmlmarkup.perl ===
# LaTeX2HTML support for the xmlmarkup package. Doesn't do indexing.
package main;
# sub ltx_next_argument{
# my $param;
# $param = missing_braces()
# unless ((s/$next_pair_pr_rx/$param=$2;''/eo)
# ||(s/$next_pair_rx/$param=$2;''/eo));
# return $param;
# }
sub do_cmd_element{
local($_) = @_;
my $name = next_argument();
return "<tt class='element'>$name</tt>" . $_;
}
sub do_cmd_attribute{
local($_) = @_;
my $name = next_argument();
return "<tt class='attribute'>$name</tt>" . $_;
}
sub do_env_attributedesc{
local($_) = @_;
my $name = next_argument();
my $valuetype = next_argument();
return ("\n<dl class='macrodesc'>"
. "\n<dt><b><tt class='macro'>$name</tt></b>"
. " ($valuetype)"
. "\n<dd>"
. $_
. "</dl>");
}
sub do_env_elementdesc{
local($_) = @_;
my $name = next_argument();
my $contentmodel = next_argument();
return ("\n<dl class='elementdesc'>"
. "\n<dt class='start-tag'><tt><"
. "<b class='element'>$name</b>></tt>"
. "\n<dd class='content-model'>$contentmodel"
. "\n<dt class='endtag'><tt></"
. "<b class='element'>$name</b>></tt>"
. "\n<dd class='descrition'>"
. $_
. "</dl>");
}
1; # Must end with this, because Perl is bogus.
=== Added File Zope/lib/python/ZConfig/doc/xmlmarkup.sty ===
% Created by Fred L. Drake, Jr. <fdrake@acm.org>, as part of the
% Python Documentation Project.
%
% Define some simple markup for the LaTeX command documentation:
\ProvidesPackage{xmlmarkup}
\RequirePackage{python} % fulllineitems environment
\newcommand{\element}[1]{\code{#1}}
\newcommand{\attribute}[1]{\code{#1}}
% \begin{elementdesc}{type}{content-model}
\newenvironment{elementdesc}[2]{
\begin{fulllineitems}
\item[\code{\textless{\bfseries #1}\textgreater}]
\code{#2}
\item[\code{\textless/{\bfseries #1}\textgreater}]
\index{#1 element@\py@idxcode{#1} element}
\index{elements!#1@\py@idxcode{#1}}
}{\end{fulllineitems}}
% \begin{attributedesc}{name}{content-type}
\newenvironment{attributedesc}[2]{
\begin{fulllineitems}
\item[\code{\bfseries#1}{\quad(#2)}]
\index{#1@\py@idxcode{#1}}
}{\end{fulllineitems}}
=== Zope/lib/python/ZConfig/doc/.cvsignore 1.2 => 1.2.58.1 ===
--- Zope/lib/python/ZConfig/doc/.cvsignore:1.2 Thu Oct 10 11:14:27 2002
+++ Zope/lib/python/ZConfig/doc/.cvsignore Mon Jan 13 20:17:30 2003
@@ -1,2 +1,3 @@
+zconfig
zconfig.pdf
zconfig.ps
=== Zope/lib/python/ZConfig/doc/Makefile 1.4 => 1.4.6.1 ===
--- Zope/lib/python/ZConfig/doc/Makefile:1.4 Fri Dec 20 10:45:50 2002
+++ Zope/lib/python/ZConfig/doc/Makefile Mon Jan 13 20:17:30 2003
@@ -1,18 +1,32 @@
# Rules to convert the documentation to a single PDF file.
#
+# PostScript and HTML output are also supported, though PDF is the
+# default.
+#
# See the README.txt file for information on the mkhowto program used
# to generate the PDF and PostScript versions of the documentation.
-.PHONY: default all pdf ps
+.PHONY: default all html pdf ps
default: pdf
-all: pdf ps
+all: html pdf ps
+html: zconfig/zconfig.html
pdf: zconfig.pdf
ps: zconfig.ps
-zconfig.pdf: zconfig.tex
+zconfig/zconfig.html: zconfig.tex schema.dtd xmlmarkup.perl
+ mkhowto --html $<
+
+zconfig.pdf: zconfig.tex schema.dtd xmlmarkup.sty
mkhowto --pdf $<
-zconfig.ps: zconfig.tex
+zconfig.ps: zconfig.tex schema.dtd xmlmarkup.sty
mkhowto --postscript $<
+
+clean:
+ rm -f zconfig.l2h zconfig.l2h~
+
+clobber: clean
+ rm -f zconfig.pdf zconfig.ps
+ rm -rf zconfig
=== Zope/lib/python/ZConfig/doc/zconfig.tex 1.47 => 1.47.2.1 === (1037/1137 lines abridged)
--- Zope/lib/python/ZConfig/doc/zconfig.tex:1.47 Thu Jan 9 17:31:25 2003
+++ Zope/lib/python/ZConfig/doc/zconfig.tex Mon Jan 13 20:17:30 2003
@@ -1,4 +1,7 @@
\documentclass{howto}
+\usepackage{xmlmarkup}
+
+\newcommand{\datatype}[1]{\strong{#1}}
\title{ZConfig Package Reference}
@@ -66,17 +69,17 @@
{http://www.python.org/doc/current/lib/module-ConfigParser.html}
format, this format supports key-value pairs arranged in sections.
Unlike the \module{ConfigParser} format, sections are typed and can be
-organized hierarchically, and support delegation of value lookup to
-other sections. Additional files may be included if needed. Though
-both formats are substantially line-oriented, this format is more
-flexible.
+organized hierarchically.
+% XXX and support delegation of value lookup to other sections.
+Additional files may be included if needed. Though both formats are
+substantially line-oriented, this format is more flexible.
The intent of supporting nested section is to allow setting up the
configurations for loosely-associated components in a container. For
example, each process running on a host might get its configuration
-section from that host's section of a shared configuration file. Each
-section may use the delegation syntax to share a base configuration
-with other components of the same type.
+section from that host's section of a shared configuration file.
+% XXX Each section may use the delegation syntax to share a base
+% configuration with other components of the same type.
The top level of a configuration file consists of a series of
inclusions, key-value pairs, and sections.
@@ -127,11 +130,12 @@
denote optional parts):
\begin{alltt}
-<\var{section-type} \optional{\var{name}} \optional{(\var{basename})} >
+<\var{section-type} \optional{\var{name}} >
\end{alltt}
+% <\var{section-type} \optional{\var{name}} \optional{(\var{basename})} >
-\var{section-type}, \var{name}, and \var{basename} all have the same
-syntactic constraints as key names.
+\var{section-type} and \var{name} % and \var{basename}
+all have the same syntactic constraints as key names.
The terminator looks like this:
[-=- -=- -=- 1037 lines omitted -=- -=- -=-]
-\begin{description}
- \item[(1)] This is different from the Bourne shell, which uses
- \code{\textbackslash\$} to generate a \character{\$} in
- the result text. This difference avoids having as many
- special characters in the syntax.
-
- \item[(2)] Any character which immediately follows \var{name} may
- not be a valid character in a name.
-\end{description}
-
-In each case, \var{name} is a non-empty sequence of alphanumeric and
-underscore characters not starting with a digit. If there is not a
-replacement for \var{name}, the exception
-\exception{SubstitutionReplacementError} is raised.
-Note that the lookup is expected to be case-insensitive; this module
-will always use a lower-case version of the name to perform the query.
-
-This module provides these functions:
-
-\begin{funcdesc}{substitute}{s, mapping}
- Substitute values from \var{mapping} into \var{s}. \var{mapping}
- can be a \class{dict} or any type that supports the \method{get()}
- method of the mapping protocol. Replacement
- values are copied into the result without further interpretation.
- Raises \exception{SubstitutionSyntaxError} if there are malformed
- constructs in \var{s}.
-\end{funcdesc}
-
-\begin{funcdesc}{isname}{s}
- Returns \code{True} if \var{s} is a valid name for a substitution
- text, otherwise returns \code{False}.
-\end{funcdesc}
-
-
-\subsection{Examples}
-
-\begin{verbatim}
->>> from ZConfig.substitution import substitute
->>> d = {'name': 'value',
-... 'top': '$middle',
-... 'middle' : 'bottom'}
->>>
->>> substitute('$name', d)
-'value'
->>> substitute('$top', d)
-'$middle'
-\end{verbatim}
\end{document}