3 # $Id: filter2docs.pl,v 1.3 2008/05/11 12:31:29 fabiankeil Exp $
4 # $Source: /cvsroot/ijbswa/current/utils/filter2docs.pl,v $
6 # Parse the filter names and descriptions from a filter file and
7 # spit out copy&paste-ready markup for the various places in
8 # configuration and documentation where all filters are listed.
13 die "Usage: $0 filter-file\n" unless (@ARGV == 1) ;
14 open(INPUT, "< $ARGV[0]") or die "Coudln't open input file $ARGV[0] because $!\n";
16 my ($comment_lines, $action_lines, $sgml_source_1, $sgml_source_2);
19 if (/^(FILTER): ([-\w]+) (.*)$/) {
23 my $type = lc($type_uc);
25 $comment_lines .= "# $name:" . (" " x (20-length($name))) . "$description\n";
26 $action_lines .= "+$type" . "{$name} \\\n";
27 $sgml_source_1 .= " <para>\n <anchor id=\"$type-$name\">\n <screen>+" . $type . "{$name}" .
28 (" " x (20-length($name))) . "# $description</screen>\n </para>\n";
29 $sgml_source_2 .= " -<link linkend=\"" . $type_uc . "-" . uc($name) . "\">$type" . "{$name}</link> \\\n";
35 Comment lines for default.action:
39 Block of filter actions for standard.action:
43 SGML Source for AF chapter in U-M:
47 SGML Source for AF Tutorial chapter in U-M: