]>
iEval git - plack-app-gruntmaster.git/blob - gruntmaster-contest
4 use Gruntmaster
::Data qw
/contests insert_contest remove_contest contest_name contest_owner contest_start contest_end/;
6 use IO
::Prompter
[ -style
=> 'bold', '-stdio', '-verbatim' ];
7 use File
::Slurp qw
/read_file/;
8 use Term
::ANSIColor qw
/RED RESET/;
9 use POSIX qw
/strftime/;
10 use Date
::Parse qw
/str2time/;
12 ##################################################
24 local $_ = shift or goto &cmd_list
;
25 say "Name: ", contest_name
;
26 say "Owner: ", contest_owner
;
27 say "Start: ", strftime
'%c', localtime contest_start
;
28 say "End: ", strftime
'%c', localtime contest_end
;
33 my $name = prompt
'Contest name';
34 my $owner = prompt
'Owner';
35 my $start = str2time prompt
'Start time' or die 'Cannot parse time';
36 my $end = str2time prompt
'End time' or die 'Cannot parse time';
38 insert_contest
$id => name
=> $name, owner
=> $owner, start
=> $start, end
=> $end;
45 ##################################################
48 my $cmd = 'cmd_' . shift;
49 cmd_help
unless exists $main::{$cmd};
50 $cmd->(@ARGV) if exists $main::{$cmd};
59 gruntmaster-contest - shell interface to Gruntmaster 6000 contests
63 gruntmaster-contest list
64 gruntmaster-contest show id
65 gruntmaster-contest add id
66 gruntmaster-contest rm id
This page took 0.053318 seconds and 4 git commands to generate.