Re: Any way to keep 1-line record of my postings?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Thu, May 23, 2002 at 01:21:19AM -0400, David Combs wrote:
> What I would LIKE from trn would be that whenever I did a post, trn
> would append maybe just a single line to a trn-logfile, that line
> having the format perhaps of:
> date/time newsgroupName subject
> Then, to see what needs looking for replies, I just "tail -20
> trnlogfile.txt".

I'm coming over more and more to the opinion that Pnews ought to be
considered as a configuration file. It should be fairly easy to insert
what you need into Pnews - look for 'send)' (line 607 in my version) and
put $tmpart through a perl script at the end of that case block (so I
would have the insertion point at line 662). Something like this should
work (but I haven't tested it):

  cat "$tmpart" | perl -ne 'if (/^(Newsgroups|Subject):\s*(.*)/i) {
                    $header{lc $1} = $2 unless defined $header{lc $1};
                  END {
                    print scalar localtime,
                          " $header{newsgroups} $header{subject}\n";
                  }' >> ~/.trn/postings.log

(This doesn't handle multi-line headers. Extension for that "is left as
an exercise for the reader".)

Some day I must dig up my patches to Pnews that allowed postponing
articles. I don't think they were all that invasive, although they might
have involved a couple of extra states.

Colin Watson                                  []


Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas --

[Index of Archives]     [Photo]     [Yosemite]     [Epson Inkjet]     [Mhonarc]     [Nntpcache]

  Powered by Linux