INN commit: trunk (3 files)

INN Commit rra at isc.org
Sun Nov 1 19:42:54 UTC 2009


    Date: Sunday, November 1, 2009 @ 11:42:54
  Author: iulius
Revision: 8698

* New "t" flag for "-w" with cvtbatch, so as to retrieve the
arrival time of an article.

* Convert the man page to POD.  Mention the default value for
"-w"; it is no longer possible to use file names with cvtbatch.

Added:
  trunk/doc/pod/cvtbatch.pod
Modified:
  trunk/backends/cvtbatch.c
Deleted:
  trunk/doc/man/cvtbatch.8

----------------------+
 backends/cvtbatch.c  |   13 +++++++++--
 doc/man/cvtbatch.8   |   53 ---------------------------------------------
 doc/pod/cvtbatch.pod |   57 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+), 55 deletions(-)

Modified: backends/cvtbatch.c
===================================================================
--- backends/cvtbatch.c	2009-11-01 16:56:18 UTC (rev 8697)
+++ backends/cvtbatch.c	2009-11-01 19:42:54 UTC (rev 8698)
@@ -1,6 +1,6 @@
 /*  $Id$
 **
-**  Read file list on standard input and spew out batchfiles.
+**  Read file list on standard input and spew out batch files.
 */
 
 #include "config.h"
@@ -27,7 +27,8 @@
     bool	Dirty;
     TOKEN	token;
     ARTHANDLE	*art;
-    int		len;
+    size_t	len;
+    time_t      arrived;
 
     /* First thing, set up our identity. */
     message_program_name = "cvtbatch";
@@ -45,6 +46,7 @@
 	    for (p = format = optarg; *p; p++) {
 		switch (*p) {
 		case FEED_BYTESIZE:
+                case FEED_TIMERECEIVED:
 		case FEED_FULLNAME:
 		case FEED_MESSAGEID:
 		case FEED_NAME:
@@ -81,6 +83,8 @@
 	    continue;
 	}
 	len = art->len;
+        arrived = art->arrived;
+
 	for (r = text; r < art->data + art->len; r++) {
 	    if (*r == '\r' || *r == '\n')
 		break;
@@ -115,6 +119,11 @@
 		    putchar(' ');
 		printf("%s", q);
 		break;
+            case FEED_TIMERECEIVED:
+                if (Dirty)
+                    putchar(' ');
+                printf("%lu", (unsigned long) arrived);
+                break;
 	    }
 	    Dirty = true;
 	}

Deleted: doc/man/cvtbatch.8
===================================================================
--- doc/man/cvtbatch.8	2009-11-01 16:56:18 UTC (rev 8697)
+++ doc/man/cvtbatch.8	2009-11-01 19:42:54 UTC (rev 8698)
@@ -1,53 +0,0 @@
-.\" $Revision$
-.TH CVTBATCH 8
-.SH NAME
-cvtbatch \- convert Usenet batch file to INN format
-.SH SYNOPSIS
-.I cvtbatch
-[
-.BI \-w " items"
-]
-.SH DESCRIPTION
-.I Cvtbatch
-reads standard input as a sequence of lines, converts each line, and
-writes it to standard output.
-It is used to convert simple batchfiles that contain just the article
-name to INN batchfiles that contain additional information about each
-article.
-.PP
-Each line is taken as a storage API token indicating a Usenet article.
-(Only the first word of each line is parsed; anything following
-whitespace is ignored.  Lines not starting with a valid token are also
-silently ignored.)
-.PP
-If the input file consists of a series of Message-ID's, then use
-.IR grephistory (1)
-with the `\fB`\-s\fP'' flag piped into
-.IR cvtbatch .
-.SH OPTIONS
-.TP
-.B \-w
-The `\fB`\-w\fP'' flag specifies how each output line should be written.
-The items for this flag should be chosen from the ``W'' flag items as
-specified in
-.IR newsfeeds (5).
-They may be chosen from the following set:
-.PP
-.RS
-.nf
-	b	Size of article in bytes
-	f	full pathname of article
-	m	article message-id
-	n	relative pathname of article
-.fi
-.RE
-.SH HISTORY
-Written by Rich $alz <rsalz at uunet.uu.net> for InterNetNews.
-.de R$
-This is revision \\$3, dated \\$4.
-..
-.R$ $Id$
-.SH "SEE ALSO"
-grephistory(1),
-inn.conf(5),
-newsfeeds(5).

Added: doc/pod/cvtbatch.pod
===================================================================
--- doc/pod/cvtbatch.pod	                        (rev 0)
+++ doc/pod/cvtbatch.pod	2009-11-01 19:42:54 UTC (rev 8698)
@@ -0,0 +1,57 @@
+=head1 NAME
+
+cvtbatch - Convert Usenet batch files to INN format
+
+=head1 SYNOPSIS
+
+B<cvtbatch> [B<-w> I<items>]
+
+=head1 DESCRIPTION
+
+B<cvtbatch> reads standard input as a sequence of lines, converts
+each line, and writes it to standard output.  It is used to convert
+simple batch files that contain just the storage API token of
+an article to INN batch files that contain additional information
+about each article.
+
+Each line is taken as a storage API token indicating a Usenet article.
+Only the first word of each line is parsed; anything following whitespace
+is ignored.  Lines not starting with a valid token are also silently ignored.
+
+If the input file consists of a series of message-IDs, then use
+B<grephistory> with the B<-s> flag piped into B<cvtbatch>.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-w> I<items>
+
+The B<-w> flag specifies how each output line should be written.
+The items for this flag should be chosen from the C<W> flag items
+as specified in newsfeeds(5).  They may be chosen from the following
+set:
+
+    b    Size of the article headers in bytes.
+    f    Storage API token of the article (same as "n").
+    m    Article message-ID.
+    n    Storage API token of the article.
+    t    Arrival time of the article as seconds since epoch.
+
+The default is C<nm>, that is to say the storage API token
+followed by the message-ID of the article.
+
+=back
+
+=head1 HISTORY
+
+Written by Rich $alz <rsalz at uunet.uu.net> for InterNetNews.  Converted
+to POD by Julien Elie.
+
+$Id$
+
+=head1 SEE ALSO
+
+grephistory(1), newsfeeds(5).
+
+=cut


Property changes on: trunk/doc/pod/cvtbatch.pod
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native




More information about the inn-committers mailing list