From b6013d244489aca80a904755ec2531874361185c Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 25 May 2008 22:59:33 +0200 Subject: [PATCH] Cleanups in mop/eval/. --- mop/eval/mo-ev-all.sh | 1 + mop/eval/mo-ev-inc.sh | 2 ++ mop/eval/mo-get-users.sh | 1 + mop/eval/mo-report.sh | 2 ++ mop/eval/mo-score.sh | 15 ++++++++------- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/mop/eval/mo-ev-all.sh b/mop/eval/mo-ev-all.sh index 8ce6dff..f1abc6f 100755 --- a/mop/eval/mo-ev-all.sh +++ b/mop/eval/mo-ev-all.sh @@ -1,4 +1,5 @@ #!/bin/bash +# Run `ev' on all solutions of given tasks [ -n "$1" ] || { echo "Usage: mo-ev-all " ; exit 1 ; } diff --git a/mop/eval/mo-ev-inc.sh b/mop/eval/mo-ev-inc.sh index 26f856b..437d9af 100755 --- a/mop/eval/mo-ev-inc.sh +++ b/mop/eval/mo-ev-inc.sh @@ -1,4 +1,6 @@ #!/bin/bash +# An incremental evaluator: detect which solutions were changed since +# last run and run `ev' on them. [ -n "$1" ] || { echo "Usage: mo-ev-inc [--force] " ; exit 1 ; } diff --git a/mop/eval/mo-get-users.sh b/mop/eval/mo-get-users.sh index 8adb6d3..172e522 100755 --- a/mop/eval/mo-get-users.sh +++ b/mop/eval/mo-get-users.sh @@ -1,4 +1,5 @@ #!/bin/bash +# List all contestants according to $CT_USER_LIST if [ "$1" = --help ] ; then echo "Usage: mo-get-users [--full]" diff --git a/mop/eval/mo-report.sh b/mop/eval/mo-report.sh index 57828b6..8dc71ca 100755 --- a/mop/eval/mo-report.sh +++ b/mop/eval/mo-report.sh @@ -1,4 +1,6 @@ #!/usr/bin/perl +# A simple generator of evaluation reports +# (c) 2007 Martin Mares use strict; use warnings; diff --git a/mop/eval/mo-score.sh b/mop/eval/mo-score.sh index 4dec3a1..9ed73f4 100755 --- a/mop/eval/mo-score.sh +++ b/mop/eval/mo-score.sh @@ -1,4 +1,5 @@ #!/usr/bin/perl +# A generator of score sheets. More ugly than it deserves. $debug = 0; $detail = 0; @@ -199,7 +200,7 @@ if ($debug) { my @perm; &printHtmlHeader(\@perm); print ""; - + foreach $r (@table[1..($#table - 1)]) { &printHtmlRow(@{$r}[@perm]); } @@ -252,18 +253,18 @@ sub printHtmlHeader { $p++; map { push @$perm, $p++ } (1..$nSub); push @$perm, $p - $nSub - 1; - + $colspec .= "\n"; $colspec .= "\n"; $hdr1 .= "$task"; $hdr2 .= join("", map { "$_" } sort {$a <=> $b} keys %{$known_tests{$task}}); $hdr2 .= "Total"; } - + $hdr1 .= "Total"; - + } else { ## no detail - + $hdr1 = "RankUserName"; $extras and $p++ and push @$perm, 3 and $hdr1.="Extra" and $colspec.=""; ##Extra hack @@ -276,10 +277,10 @@ sub printHtmlHeader { } push @$perm, $p++; - + print "\n"; print "$colspec\n"; print "$hdr1\n"; print "$hdr2\n" if $detail; - + } -- 2.39.2