use IO::Prompter [ -style => 'bold', '-stdio', '-verbatim' ];
use File::Slurp qw/read_file/;
use Term::ANSIColor qw/RED RESET/;
-use Getopt::Long qw/GetOptions/;
+use Getopt::Long qw/:config require_order/;
##################################################
=head1 SYNOPSIS
- gruntmaster-problem add problem_id
- gruntmaster-problem list
- gruntmaster-problem rm problem_id
- gruntmaster-problem show problem_id
-
+ gruntmaster-problem [--contest=mycontest] add problem_id
+ gruntmaster-problem [--contest=mycontest] list
+ gruntmaster-problem [--contest=mycontest] rm problem_id
+ gruntmaster-problem [--contest=mycontest] show problem_id
+ gruntmaster-problem [--contest=mycontest] set [--file] problem_id key value
=head1 DESCRIPTION
+gruntmaster-problem is a tool for managing problems.
+
+Select the contest with the optional argument I<--contest>.
+
+=over
+
+=item B<list>
+
+Prints the list of problems in the selected contest.
+
+=item B<show> I<id>
+
+Prints detailed information about problem I<id>.
+
+=item B<add> I<id>
+
+Adds a new problem with id I<id>.
+
+=item B<rm> I<id>
+
+Removes the problem with id I<id>.
+
+=item B<set> I<id> I<key> I<value>
+
+Sets the I<key> configuration option of problem I<id> to I<value>.
+
+=item B<set> --file I<id> I<key> I<file>
+
+Sets the I<key> configuration option of problem I<id> to the contents of the file I<file>.
+
+=back
+
+=head1 AUTHOR
+
+Marius Gavrilescu E<lt>marius@ieval.roE<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2014 by Marius Gavrilescu
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
=cut