* Rasterized jubberish, Closes: #81901
[filters.git] / jibberish
1 #!/usr/bin/perl
2 # jibberish -- run all filters in random order
3
4 $ENV{PATH}.=":/usr/games";
5
6 @all= qw(
7 eleet
8 b1ff
9 chef
10 jethro
11 upside-down
12 kraut
13 cockney
14 jive
15 nyc
16 rasterman
17 );
18
19 @nonfree= qw(
20 kyoote
21 newspeak
22 );
23
24 # Test to see if non-free filters are here, if so, add them to @all.
25 foreach (@nonfree) {
26 if (-x "/usr/games/$_") {
27 push @all, $_;
28 }
29 }
30
31 # shuffle order
32 srand;
33 for (0..$#all) {
34 my $n= @all*rand;
35 my $was= $all[$_];
36 $all[$_]= $all[$n];
37 $all[$n]= $was;
38 }
39
40 # start the pipe...
41 my $pipe= join '|', @all;
42 open FILTER, "$pipe|"
43 or die ""Never mind...\n";;
44
45 # display the results
46 while (<FILTER>) {
47 print $_
48 }
49
50 # This could be optimized: take the last program off the pipeline,
51 # open the pipeline as standard input, then exec that last program.
52 #
53 # But you have to ask yourself: how important is it to optimize
54 # the generation of jibberish?
This page took 0.024176 seconds and 5 git commands to generate.