X-Git-Url: https://code.th-h.de/?p=usenet%2Fyapfaq.git;a=blobdiff_plain;f=yapfaq.pl;h=b509d9b2245fa320287aae7e6227f8946f949904;hp=520a635a41ffa667eabb23baa20e128c18d218e8;hb=605916ef6182670d998bd2df17c5a766f967b72f;hpb=647af2ea073bb605e68f605ffd5f1738cb408034 diff --git a/yapfaq.pl b/yapfaq.pl index 520a635..b509d9b 100644 --- a/yapfaq.pl +++ b/yapfaq.pl @@ -14,13 +14,18 @@ my $Version = "0.8-prelease"; +# Please do not change this setting! +# You may override the default .rc file (.yapfaqrc) by using "-c .rc file" my $RCFile = '.yapfaqrc'; +# Valid configuration variables for use in a .rc file my @ValidConfVars = ('NNTPServer','NNTPUser','NNTPPass','Sender','ConfigFile', 'UsePGP','pgp','PGPVersion','PGPSigner','PGPPass', 'PathtoPGPPass','pgpbegin','pgpend','pgptmpf','pgpheader'); -################################### Defaults ################################## -my %Config = (NNTPServer => "localhost", +################################### Defaults ################################### +# Please do not change anything in here! +# Use a runtime configuration file (.yapfaqrc by default) to override defaults. +my %Config = (NNTPServer => "", NNTPUser => "", NNTPPass => "", Sender => "", @@ -50,7 +55,7 @@ my @PGPorderheaders = ('from', 'newsgroups', 'subject', 'control', 'content-transfer-encoding', 'summary', 'keywords', 'cancel-lock', 'cancel-key', 'also-control', 'x-pgp', 'user-agent'); -############################# End of Configuration ############################# +################################# Main program ################################# use strict; use Net::NNTP; @@ -166,7 +171,7 @@ sub readconfig{ my ($File, $Config, $Faq) = @_; my ($LastEntry, $Error, $i) = ('','',0); - print "Reading configuration.\n" if($Options{'v'}); + print "Reading configuration from $$File.\n" if($Options{'v'}); open FH, "<$$File" or die "$0: E: Can't open $$File: $!"; while () { @@ -572,7 +577,7 @@ yapfaq - Post Usenet FAQs I<(yet another postfaq)> =head1 SYNOPSIS -B [B<-hvpd>] [B<-t> I | CONSOLE] [B<-f> I] [B<-s> I] [B<-c> I<.rc file>] +B [B<-Vhvpd>] [B<-t> I | CONSOLE] [B<-f> I] [B<-s> I] [B<-c> I<.rc file>] =head1 REQUIREMENTS @@ -944,9 +949,26 @@ if it is due: yapfaq -t de.test -f myfaq +Post all FAQs (that are due for posting) using inews from INN: + + yapfaq -s inews + +Do a dry run using a runtime configuration from .alternaterc, showing +which FAQs would be posted: + + yapfaq -dvc .alternaterc + =head1 ENVIRONMENT -There are no special environment variables used by B. +=over 4 + +=item NNTPSERVER + +The default NNTP server to post to, used by the Net::NNTP module. You +can also specify the server using the runtime configuration file (by +default F<.yapfaqrc>). + +=back =head1 FILES