]>
iEval git - plack-app-gruntmaster.git/blob - gruntmaster-contest
6 use IO
::Prompter
[ -style
=> 'bold', '-stdio', '-verbatim' ];
7 use POSIX qw
/strftime/;
8 use Date
::Parse qw
/str2time/;
10 ##################################################
22 local $_ = shift or goto &cmd_list
;
23 say "Name: ", contest_name
;
24 say "Owner: ", contest_owner
;
25 say "Start: ", strftime
'%c', localtime contest_start
;
26 say "End: ", strftime
'%c', localtime contest_end
;
31 my $name = prompt
'Contest name';
32 my $owner = prompt
'Owner';
33 my $start = str2time prompt
'Start time' or die 'Cannot parse time';
34 my $end = str2time prompt
'End time' or die 'Cannot parse time';
36 insert_contest
$id => name
=> $name, owner
=> $owner, start
=> $start, end
=> $end;
37 PUBLISH genpage
=> "ct/$id/index.html";
38 PUBLISH genpage
=> "ct/index.html";
43 PUBLISH genpage
=> "ct/index.html";
46 ##################################################
49 my $cmd = 'cmd_' . shift;
50 cmd_help
unless exists $main::{$cmd};
51 $cmd->(@ARGV) if exists $main::{$cmd};
60 gruntmaster-contest - shell interface to Gruntmaster 6000 contests
64 gruntmaster-contest list
65 gruntmaster-contest show id
66 gruntmaster-contest add id
67 gruntmaster-contest rm id
This page took 0.049699 seconds and 4 git commands to generate.