Add "Program" to .yapfaqrc.
Fixes #2. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
		
							parent
							
								
									0e741504fe
								
							
						
					
					
						commit
						39cb5672df
					
				
					 2 changed files with 17 additions and 2 deletions
				
			
		| 
						 | 
					@ -3,3 +3,4 @@ NNTPUser   = ''
 | 
				
			||||||
NNTPPass   = ''
 | 
					NNTPPass   = ''
 | 
				
			||||||
Sender     = ''
 | 
					Sender     = ''
 | 
				
			||||||
ConfigFile = 'yapfaq.cfg'
 | 
					ConfigFile = 'yapfaq.cfg'
 | 
				
			||||||
 | 
					Program    = ''
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										18
									
								
								yapfaq.pl
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								yapfaq.pl
									
										
									
									
									
								
							| 
						 | 
					@ -18,7 +18,7 @@ my $Version = "0.8-prelease";
 | 
				
			||||||
# You may override the default .rc file (.yapfaqrc) by using "-c .rc file"
 | 
					# You may override the default .rc file (.yapfaqrc) by using "-c .rc file"
 | 
				
			||||||
my $RCFile = '.yapfaqrc';
 | 
					my $RCFile = '.yapfaqrc';
 | 
				
			||||||
# Valid configuration variables for use in a .rc file
 | 
					# Valid configuration variables for use in a .rc file
 | 
				
			||||||
my @ValidConfVars = ('NNTPServer','NNTPUser','NNTPPass','Sender','ConfigFile');
 | 
					my @ValidConfVars = ('NNTPServer','NNTPUser','NNTPPass','Sender','ConfigFile','Program');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
################################### Defaults ###################################
 | 
					################################### Defaults ###################################
 | 
				
			||||||
# Please do not change anything in here!
 | 
					# Please do not change anything in here!
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,8 @@ my %Config = (NNTPServer => "",
 | 
				
			||||||
              NNTPUser   => "",
 | 
					              NNTPUser   => "",
 | 
				
			||||||
              NNTPPass   => "",
 | 
					              NNTPPass   => "",
 | 
				
			||||||
              Sender     => "",
 | 
					              Sender     => "",
 | 
				
			||||||
              ConfigFile => "yapfaq.cfg");
 | 
					              ConfigFile => "yapfaq.cfg",
 | 
				
			||||||
 | 
					              Program    => "");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
################################# Main program #################################
 | 
					################################# Main program #################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -64,6 +65,8 @@ if (-f $RCFile) {
 | 
				
			||||||
  warn "$0: W: .rc file $RCFile does not exist!\n";
 | 
					  warn "$0: W: .rc file $RCFile does not exist!\n";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$Options{'s'} = $Config{'Program'} if (!defined($Options{'s'}));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# read configuration (configured FAQs)
 | 
					# read configuration (configured FAQs)
 | 
				
			||||||
my @Config;
 | 
					my @Config;
 | 
				
			||||||
readconfig (\$Config{'ConfigFile'}, \@Config, \$Faq);
 | 
					readconfig (\$Config{'ConfigFile'}, \@Config, \$Faq);
 | 
				
			||||||
| 
						 | 
					@ -639,6 +642,13 @@ This setting is optional.
 | 
				
			||||||
The configuration file defining the FAQ(s) to post. Must be set (or
 | 
					The configuration file defining the FAQ(s) to post. Must be set (or
 | 
				
			||||||
omitted; the default is "yapfaq.cfg").
 | 
					omitted; the default is "yapfaq.cfg").
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					=item B<Program> = I<file name> (optional)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					A program the article is piped to instead of posting it to Usenet.
 | 
				
			||||||
 | 
					See option "-f" below (which takes preference).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This setting is optional.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
=back
 | 
					=back
 | 
				
			||||||
 | 
					
 | 
				
			||||||
=head3 Example runtime configuration file
 | 
					=head3 Example runtime configuration file
 | 
				
			||||||
| 
						 | 
					@ -648,6 +658,7 @@ omitted; the default is "yapfaq.cfg").
 | 
				
			||||||
    NNTPPass   = ''
 | 
					    NNTPPass   = ''
 | 
				
			||||||
    Sender     = ''
 | 
					    Sender     = ''
 | 
				
			||||||
    ConfigFile = 'yapfaq.cfg'
 | 
					    ConfigFile = 'yapfaq.cfg'
 | 
				
			||||||
 | 
					    Program    = ''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
=head3 Using more than one runtime configuration
 | 
					=head3 Using more than one runtime configuration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -713,6 +724,9 @@ For example, you may want to use the I<inews> utility from the INN package
 | 
				
			||||||
or the much more powerful replacement I<tinews.pl> from
 | 
					or the much more powerful replacement I<tinews.pl> from
 | 
				
			||||||
I<ftp://ftp.tin.org/tin/tools/tinews.pl> which is able to sign postings.
 | 
					I<ftp://ftp.tin.org/tin/tools/tinews.pl> which is able to sign postings.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If I<Program> is also defined in the runtime configuration file (by default
 | 
				
			||||||
 | 
					F<.yapfaqrc>), B<-s> takes preference.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
=item B<-c> I<.rc file>
 | 
					=item B<-c> I<.rc file>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Load another runtime configuration file (.rc file) than F<.yaofaq.rc>.
 | 
					Load another runtime configuration file (.rc file) than F<.yaofaq.rc>.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue