Skip to content

Commit fb62e1e

Browse files
authored
Add files via upload
Tools to display which modules were added to Fav or Rej lists (use them from the page_xxx list directory)
1 parent 299eb98 commit fb62e1e

File tree

6 files changed

+52
-0
lines changed

6 files changed

+52
-0
lines changed

Diff for: tools/get_all.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
clear
3+
../get_stat.pl $1 |highlight -O xterm256 --syntax=sh

Diff for: tools/get_both.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
clear
3+
../get_stat.pl $1 b |highlight -O xterm256 --syntax=sh

Diff for: tools/get_fav.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
clear
3+
../get_stat.pl $1 + |highlight -O xterm256 --syntax=sh

Diff for: tools/get_none.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
clear
3+
../get_stat.pl $1 \- |highlight -O xterm256 --syntax=sh

Diff for: tools/get_rej.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
clear
3+
../get_stat.pl $1 \x |highlight -O xterm256 --syntax=sh

Diff for: tools/get_stat.pl

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/perl
2+
3+
my $nr = $ARGV[0];
4+
my $par = $ARGV[1];
5+
6+
my $file = sprintf("page_%04d.txt", $nr);
7+
my $ffile = "fav.txt";
8+
my $rfile = "rej.txt";
9+
10+
open(IN, "<$file") or die "Cannot open file \"$file\": $!\n";
11+
open(FA, "<$ffile") or die "Cannot open file \"$ffile\": $!\n";
12+
open(RF, "<$rfile") or die "Cannot open file \"$rfile\": $!\n";
13+
14+
my (%data, %fav, %rej);
15+
16+
while(<FA>) { chomp; $fav{$_} = 1; } close(FA);
17+
while(<RF>) { chomp; $rej{$_} = 1; } close(RF);
18+
19+
my $count = 0;
20+
while(<IN>) {
21+
chomp;
22+
my $fstat = 0;
23+
my $rstat = 0;
24+
my $char = "-";
25+
26+
$fstat = 1 if (exists $fav{$_});
27+
$rstat = 1 if (exists $rej{$_});
28+
29+
if (($fstat eq 1) and ($rstat eq 1)) { $char = "b"; }
30+
if (($fstat eq 1) and ($rstat eq 0)) { $char = "+"; }
31+
if (($fstat eq 0) and ($rstat eq 1)) { $char = "x"; }
32+
33+
$count++;
34+
if ( $par eq $char ) { printf("%s %02d %s\n", $char, $count, $_); }
35+
if ( ! $par ) { printf("%s %02d %s\n", $char, $count, $_); }
36+
}
37+
close(IN);

0 commit comments

Comments
 (0)