From: Thomas Hochstein Date: Sat, 10 Apr 2010 00:17:00 +0000 (+0200) Subject: Update documentation for .rcfile. X-Git-Tag: v0.7~4 X-Git-Url: https://code.th-h.de/?p=usenet%2Fyapfaq.git;a=commitdiff_plain;h=227afd47f619343b93c4c7de22deea44b8562939;hp=86c0a10044727dae98e0ccbd9aee475e8154c15f Update documentation for .rcfile. Add the according sections to the POD documentation. Fix some wording. Signed-off-by: Thomas Hochstein --- diff --git a/yapfaq.pl b/yapfaq.pl index c9a8098..14efde4 100644 --- a/yapfaq.pl +++ b/yapfaq.pl @@ -553,7 +553,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 [B<-hvpd>] [B<-t> I | CONSOLE] [B<-f> I] [B<-s> I] [B<-c> I<.rc file>] =head1 REQUIREMENTS @@ -589,7 +589,8 @@ headers as defined in its config file (by default F). 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. +of definitions in the form of I. Everything after a "#" +sign is ignored so you may comment your configuration file. =over 4 @@ -685,7 +686,7 @@ This setting is optional. =back -=head2 Example configuration file +=head3 Example configuration file # name of your project Name = 'testpost' @@ -741,12 +742,101 @@ This setting is optional. MID-Format = '<%n-%m.%y@domain.invalid>' Supersede = yes +=head3 Status Information + Information about the last post and about how to form message IDs for posts is stored in a file named F.cfg> which will be generated if it does not exist. Each of those status files will contain two lines, the first being the date of the last time the FAQ was posted and the second being the message ID of that incarnation. +=head2 Runtime Configuration + +Apart from configuring which FAQ(s) to post you may (re)set some +runtime configuration variables via the .rcfile (by default +F<.yapfaqrc>). F<.yapfaqrc> must contain one definition in the form of +I on each line; everything after a "#" sign is ignored. + +If you omit some settings they will be set to default values hardcoded +in F. + +B + +=over 4 + +=item B = I (mandatory) + +Host name of the NNTP server to post to. Must be set (or omitted; the +default is "localhost"); if set to en empty string, B falls +back to Perl's build-in defaults (contents of environment variables +NNTPSERVER and NEWSHOST; if not set, default from Net::Config; if not +set, "news" is used). + +=item B = I (optional) + +User name used for authentication with the NNTP server (I). + +This setting is optional; if it is not set, I is ignored and +no authentication is tried. + +=item B = I (optional) + +Password used for authentication with the NNTP server (I). + +This setting is optional; it must be set if I is present. + +=item B = I (optional) + +The Sender header that will be added to every posted message. + +This setting is optional. + +=item B = I (mandatory) + +The configuration file defining the FAQ(s) to post. Must be set (or +omitted; the default is "yapfaq.cfg"). + +=item B = I (optional) + +Boolean value (0 or 1) controlling whether the FAQs will get digitally +signed via an X-PGP-Sig header. + +This setting is optional; the default is 0. + +If you have set I to 1, you must also supply the necessary +information on your PGP oder GPG installation; please refer to the +sample F<.yapfaqrc> file (see below) for more information on this +topic. + +=back + +=head3 Example runtime configuration file + + NNTPServer = 'localhost' + NNTPUser = '' + NNTPPass = '' + Sender = '' + ConfigFile = 'yapfaq.cfg' + UsePGP = 0 + + ################################## PGP-Config ################################# + pgp = '/usr/bin/pgp' # path to pgp + PGPVersion = '2' # Use 2 for 2.X 5 for PGP > 2.X and GPG for GPG + PGPSigner = '' # sign as who? + PGPPass = '' # pgp2 only + PathtoPGPPass = '' # pgp2 pgp5 and gpg + pgpbegin = '-----BEGIN PGP SIGNATURE-----' # Begin of PGP-Signature + pgpend = '-----END PGP SIGNATURE-----' # End of PGP-Signature + pgptmpf = 'pgptmp' # temporary file for PGP. + pgpheader = 'X-PGP-Sig' + +=head3 Using more than one runtime configuration + +You may use more than one runtime configuration file with the B<-c> +option (see below). + =head1 OPTIONS =over 3 @@ -802,6 +892,13 @@ Instead of posting the article(s) to Usenet pipe them to the external I on STDIN (which may post the article(s) then). A return value of 0 will be considered success. +=item B<-c> I<.rc file> + +Load another runtime configuration file (.rc file) than F<.yaofaq.rc>. + +You may for example define another usenet server to post your FAQ(s) +to or load another configuration file defining (an)other FAQ(s). + =back =head1 EXAMPLES @@ -836,6 +933,10 @@ There are no special environment variables used by B. The script itself. +=item F<.yapfaqrc> + +Runtime configuration file for B. + =item F Configuration file for B. @@ -864,10 +965,9 @@ version of this program. Thomas Hochstein -Original author (until version 0.5b from 2003): +Original author (up to version 0.5b, dating from 2003): Marc Brockschmidt - =head1 COPYRIGHT AND LICENSE Copyright (c) 2003 Marc Brockschmidt