X-Git-Url: https://code.th-h.de/?p=usenet%2Fyapfaq.git;a=blobdiff_plain;f=yapfaq.pl;h=a6dc98619623d26efa39cba79c75e923f9e8b0a7;hp=0a541c82d6cf8850029047f975e3d6d343e2df2f;hb=5ddba442dab41b5b28d060320a9e2363a768a9a5;hpb=a0605478dd5e62d6288e82ce45de56b154bf1daf diff --git a/yapfaq.pl b/yapfaq.pl index 0a541c8..a6dc986 100644 --- a/yapfaq.pl +++ b/yapfaq.pl @@ -12,7 +12,7 @@ # It can be redistributed and/or modified under the same terms under # which Perl itself is published. -my $Version = "0.6-unreleased"; +my $Version = "0.6"; my $NNTPServer = "localhost"; my $NNTPUser = ""; @@ -151,7 +151,7 @@ sub readconfig{ unless($$Config[$i]{'posting-frequency'} =~ /^\s*\d+\s*[dwmy]\s*$/) { $Error .= "E: The Posting-frequency for your project \"$$Config[$i]{'name'}\" is invalid.\n" } - unless($$Config[$i]{'expires'} =~ /^\s*\d+\s*[dwmy]\s*$/) { + unless(!$$Config[$i]{'expires'} || $$Config[$i]{'expires'} =~ /^\s*\d+\s*[dwmy]\s*$/) { $$Config[$i]{'expires'} = '3m'; # set default: 3 month warn "$0: W: The Expires for your project \"$$Config[$i]{'name'}\" is invalid - set to 3 month.\n"; } @@ -266,6 +266,9 @@ sub postfaq { } post(\@Article); + # Test mode? + return if($Options{'t'}); + if($Options{'v'}) { print "$$ActName: Save status information.\n"; } @@ -476,3 +479,329 @@ sub signpgp { my @pgpmessage = (@pgphead, "\n", @pgpbody); return \@pgpmessage; } + +__END__ + +################################ Documentation ################################# + +=head1 NAME + +yapfaq - Post Usenet FAQs I<(yet another postfaq)> + +=head1 SYNOPSIS + +B [B<-hvpd>] [B<-t> I | CONSOLE] [B<-f> I] + +=head1 REQUIREMENTS + +=over 2 + +=item - + +Perl 5.8 or later + +=item - + +Net::NNTP + +=item - + +Date::Calc + +=item - + +Getopt::Std + +=back + +Furthermore you need access to a news server to actually post FAQs. + +=head1 DESCRIPTION + +B posts (one or more) FAQs to Usenet with a certain posting +frequency (every n days, weeks, months or years), adding all necessary +headers as defined in its config file (by default F). + +=head2 Configuration + +F consists of one or more blocks, separated by C<=====> on +a single line, each containing the configuration for one FAQ as a set +of definitions in the form of I. + +=over 4 + +=item B = I + +A name referring to your FAQ, also used for generation of a Message-ID. + +This value must be set. + +=item B = I + +A file containing the message body of your FAQ and all pseudo headers +(subheaders in the news.answers style). + +This value must be set. + +=item B = I