]>
iEval git - gruntmaster-data.git/blob - gruntmaster-contest
6 use IO
::Prompter
[ -style
=> 'bold', '-stdio', '-verbatim' ];
7 use POSIX qw
/strftime/;
8 use Date
::Parse qw
/str2time/;
10 ##################################################
12 my $db = Gruntmaster
::Data
->connect('dbi:Pg:');
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 $stop = str2time prompt
'Stop time' or die 'Cannot parse time';
38 $db->contests->create({id
=> $id, name
=> $name, owner
=> $owner, start
=> $start, stop
=> $stop});
39 # insert_contest $id => name => $name, owner => $owner, start => $start, stop => $stop;
40 # PUBLISH genpage => "ct/$id/index.html";
41 # PUBLISH genpage => "ct/index.html";
45 # remove_contest shift;
46 # PUBLISH genpage => "ct/index.html";
49 ##################################################
52 my $cmd = 'cmd_' . shift;
53 cmd_help
unless exists $main::{$cmd};
54 $cmd->(@ARGV) if exists $main::{$cmd};
63 gruntmaster-contest - shell interface to Gruntmaster 6000 contests
67 gruntmaster-contest list
68 gruntmaster-contest show id
69 gruntmaster-contest add id
70 gruntmaster-contest rm id
74 gruntmaster-contest is a tool for managing contests.
80 Prints the list of contests.
84 Prints detailed information about the contest with id I<id>.
88 Adds a new contest with id I<id>.
92 Removes the contest with id I<id>
98 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
100 =head1 COPYRIGHT AND LICENSE
102 Copyright (C) 2014 by Marius Gavrilescu
104 This library is free software: you can redistribute it and/or modify
105 it under the terms of the GNU Affero General Public License as published by
106 the Free Software Foundation, either version 3 of the License, or
107 (at your option) any later version.
This page took 0.047708 seconds and 4 git commands to generate.