Clean up some mark up.

This commit is contained in:
Fred Drake 1999-04-22 16:45:26 +00:00
parent e2effbd32d
commit dd6c6d9b0a
1 changed files with 21 additions and 24 deletions

View File

@ -1,13 +1,12 @@
\section{\module{nntplib} --- \section{\module{nntplib} ---
NNTP protocol client.} NNTP protocol client}
\declaremodule{standard}{nntplib}
\declaremodule{standard}{nntplib}
\modulesynopsis{NNTP protocol client (requires sockets).} \modulesynopsis{NNTP protocol client (requires sockets).}
\indexii{NNTP}{protocol} \indexii{NNTP}{protocol}
\index{Network News Transfer Protocol} \index{Network News Transfer Protocol}
This module defines the class \class{NNTP} which implements the client This module defines the class \class{NNTP} which implements the client
side of the NNTP protocol. It can be used to implement a news reader side of the NNTP protocol. It can be used to implement a news reader
or poster, or automated news processors. For more information on NNTP or poster, or automated news processors. For more information on NNTP
@ -50,7 +49,7 @@ valid headers):
>>> s.quit() >>> s.quit()
'205 news.cwi.nl closing connection. Goodbye.' '205 news.cwi.nl closing connection. Goodbye.'
\end{verbatim} \end{verbatim}
%
The module itself defines the following items: The module itself defines the following items:
\begin{classdesc}{NNTP}{host\optional{, port \begin{classdesc}{NNTP}{host\optional{, port
@ -58,9 +57,9 @@ The module itself defines the following items:
Return a new instance of the \class{NNTP} class, representing a Return a new instance of the \class{NNTP} class, representing a
connection to the NNTP server running on host \var{host}, listening at connection to the NNTP server running on host \var{host}, listening at
port \var{port}. The default \var{port} is 119. If the optional port \var{port}. The default \var{port} is 119. If the optional
\var{user} and \var{password} are provided, the \samp{AUTHINFO USER} \var{user} and \var{password} are provided, the
and \samp{AUTHINFO PASS} commands are used to identify and \samp{AUTHINFO USER} and \samp{AUTHINFO PASS} commands are used to
authenticate the user to the server. identify and authenticate the user to the server.
\end{classdesc} \end{classdesc}
\begin{excdesc}{error_reply} \begin{excdesc}{error_reply}
@ -81,8 +80,7 @@ not begin with a digit in the range 1--5.
\end{excdesc} \end{excdesc}
\subsection{NNTP Objects} \subsection{NNTP Objects \label{nntp-objects}}
\label{nntp-objects}
NNTP instances have the following methods. The \var{response} that is NNTP instances have the following methods. The \var{response} that is
returned as the first item in the return tuple of almost all methods returned as the first item in the return tuple of almost all methods
@ -109,9 +107,9 @@ message text).
\begin{methoddesc}{newgroups}{date, time} \begin{methoddesc}{newgroups}{date, time}
Send a \samp{NEWGROUPS} command. The \var{date} argument should be a Send a \samp{NEWGROUPS} command. The \var{date} argument should be a
string of the form \code{"\var{yy}\var{mm}\var{dd}"} indicating the string of the form \code{'\var{yy}\var{mm}\var{dd}'} indicating the
date, and \var{time} should be a string of the form date, and \var{time} should be a string of the form
\code{"\var{hh}\var{mm}\var{ss}"} indicating the time. Return a pair \code{'\var{hh}\var{mm}\var{ss}'} indicating the time. Return a pair
\code{(\var{response}, \var{groups})} where \var{groups} is a list of \code{(\var{response}, \var{groups})} where \var{groups} is a list of
group names that are new since the given date and time. group names that are new since the given date and time.
\end{methoddesc} \end{methoddesc}
@ -128,19 +126,19 @@ Send a \samp{LIST} command. Return a pair \code{(\var{response},
\var{list})} where \var{list} is a list of tuples. Each tuple has the \var{list})} where \var{list} is a list of tuples. Each tuple has the
form \code{(\var{group}, \var{last}, \var{first}, \var{flag})}, where form \code{(\var{group}, \var{last}, \var{first}, \var{flag})}, where
\var{group} is a group name, \var{last} and \var{first} are the last \var{group} is a group name, \var{last} and \var{first} are the last
and first article numbers (as strings), and \var{flag} is \code{'y'} and first article numbers (as strings), and \var{flag} is
if posting is allowed, \code{'n'} if not, and \code{'m'} if the \code{'y'} if posting is allowed, \code{'n'} if not, and \code{'m'} if
newsgroup is moderated. (Note the ordering: \var{last}, \var{first}.) the newsgroup is moderated. (Note the ordering: \var{last},
\var{first}.)
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}{group}{name} \begin{methoddesc}{group}{name}
Send a \samp{GROUP} command, where \var{name} is the group name. Send a \samp{GROUP} command, where \var{name} is the group name.
Return a tuple \code{(}\var{response}\code{,} \var{count}\code{,} Return a tuple \code{(\var{response}, \var{count}, \var{first},
\var{first}\code{,} \var{last}\code{,} \var{name}\code{)} where \var{last}, \var{name})} where \var{count} is the (estimated) number
\var{count} is the (estimated) number of articles in the group, of articles in the group, \var{first} is the first article number in
\var{first} is the first article number in the group, \var{last} is the group, \var{last} is the last article number in the group, and
the last article number in the group, and \var{name} is the group \var{name} is the group name. The numbers are returned as strings.
name. The numbers are returned as strings.
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}{help}{} \begin{methoddesc}{help}{}
@ -191,7 +189,7 @@ Send a \samp{SLAVE} command. Return the server's \var{response}.
Send an \samp{XHDR} command. This command is not defined in the RFC Send an \samp{XHDR} command. This command is not defined in the RFC
but is a common extension. The \var{header} argument is a header but is a common extension. The \var{header} argument is a header
keyword, e.g. \code{'subject'}. The \var{string} argument should have keyword, e.g. \code{'subject'}. The \var{string} argument should have
the form \code{"\var{first}-\var{last}"} where \var{first} and the form \code{'\var{first}-\var{last}'} where \var{first} and
\var{last} are the first and last article numbers to search. Return a \var{last} are the first and last article numbers to search. Return a
pair \code{(\var{response}, \var{list})}, where \var{list} is a list of pair \code{(\var{response}, \var{list})}, where \var{list} is a list of
pairs \code{(\var{id}, \var{text})}, where \var{id} is an article id pairs \code{(\var{id}, \var{text})}, where \var{id} is an article id
@ -233,9 +231,8 @@ servers.
Return a pair \code{(\var{resp}, \var{list})}. \var{list} is a list Return a pair \code{(\var{resp}, \var{list})}. \var{list} is a list
of tuples, one for each article in the range delimited by the \var{start} of tuples, one for each article in the range delimited by the \var{start}
and \var{end} article numbers. Each tuple is of the form and \var{end} article numbers. Each tuple is of the form
\code{(}\var{article number}\code{,} \var{subject}\code{,} \code{(\var{article number}, \var{subject}, \var{poster}, \var{date},
\var{poster}\code{,} \var{date}\code{,} \var{id}\code{,} \var{id}, \var{references}, \var{size}, \var{lines})}.
\var{references}\code{,} \var{size}\code{,} \var{lines}\code{)}.
This is an optional NNTP extension, and may not be supported by all This is an optional NNTP extension, and may not be supported by all
servers. servers.
\end{methoddesc} \end{methoddesc}