File: gen-example-config.pl

package info (click to toggle)
newsbeuter 2.9-5+deb9u2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 4,692 kB
  • ctags: 3,693
  • sloc: cpp: 18,663; ruby: 1,797; xml: 350; sh: 199; makefile: 171; perl: 101
file content (23 lines) | stat: -rwxr-xr-x 645 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl -w

use strict;

print "####################################\n";
print "# newsbeuter example configuration #\n";
print "####################################\n\n";

while (my $line = <STDIN>) {
	my ($option,$syntax,$defaultparam,$desc,$example) = split(/\|/, $line);
	if ($defaultparam ne "n/a") {
		print "## configuration option: " . $option . "\n";
		if ($desc =~ /limitation in AsciiDoc/) {
			$desc =~ s/ \([^)]*\)\.$/./;
			$defaultparam =~ s/;/|/g;
		}
		print "## description: " . $desc . "\n";
		print "## parameter syntax: " . $syntax . "\n";
		print "# " . $option . " " . $defaultparam . "\n\n";
	}
}

print "# EOF\n"