]> iEval git - gruntmaster-page.git/blame - gruntmaster-job
Use zeptojs instead of jquery and load form.js
[gruntmaster-page.git] / gruntmaster-job
CommitLineData
83a8a7d6
MG
1#!/usr/bin/perl -w
2use v5.14;
3
4use Gruntmaster::Data qw/jobcard job_date job_user job_problem job_filesize job_private job_result_text job_daemon clean_job problem_name PUBLISH HDEL/;
5
6use IO::Prompter [ -style => 'bold', '-stdio', '-verbatim' ];
7use File::Slurp qw/read_file/;
8use Term::ANSIColor qw/RED RESET/;
9use POSIX qw/strftime/;
10
11##################################################
12
13sub cmd_help{
14 exec perldoc => $0
15}
16
17sub cmd_card{
18 my $contest = shift;
19 print jobcard;
20}
21
22sub cmd_show{
23 local $_ = shift or goto &cmd_list;
24 say "Date: " , strftime ('%c', localtime job_date);
25 say "User: ", job_user;
26 say "Problem: ", problem_name job_problem;
27 say "Size: ", sprintf "%.2fKB", job_filesize() / 1024;
28 say "Private: ", (job_private() ? 'yes' : 'no');
29 say "Result text: ", job_result_text;
30 say "Daemon: ", job_daemon;
31}
32
33sub cmd_rerun{
34 local $_ = shift or goto &cmd_list;
35 clean_job;
36 PUBLISH jobs => $_;
37}
38
39##################################################
40
41no strict 'refs';
42my $cmd = 'cmd_' . shift;
43cmd_help unless exists $main::{$cmd};
44$cmd->(@ARGV) if exists $main::{$cmd};
45
461;
47__END__
48
49=encoding utf-8
50
51=head1 NAME
52
53gruntmaster-job - shell interface to Gruntmaster 6000 job log
54
55=head1 SYNOPSIS
56
57 gruntmaster-job card
58 gruntmaster-job show 5
59 gruntmaster-job rerun 7
60
61=head1 DESCRIPTION
62
63
64
65=cut
This page took 0.019924 seconds and 4 git commands to generate.