Add get subcommand to gruntmaster-problem
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 10 Apr 2014 09:43:32 +0000 (12:43 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 10 Apr 2014 09:43:32 +0000 (12:43 +0300)
gruntmaster-problem

index 724a17eace3704e8d108c0b46c0b0361278e464f..1b240e0c4b3772973ac5d53f66d140b4bf961acd 100755 (executable)
@@ -89,6 +89,11 @@ sub cmd_set{
        #PUBLISH genpage => "pb/$id.html";
 }
 
+sub cmd_get{
+       my ($id, $col) = @ARGV;
+       say $db->problem($id)->get_column($col)
+}
+
 sub cmd_list{
        local $, = "\n";
        say map {$_->id} $db->problems->all;
@@ -121,11 +126,12 @@ gruntmaster-problem - shell interface to Gruntmaster 6000 problems
 
 =head1 SYNOPSIS
 
-  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
+  gruntmaster-problem add problem_id
+  gruntmaster-problem list
+  gruntmaster-problem rm problem_id
+  gruntmaster-problem show problem_id
+  gruntmaster-problem set [--file] problem_id key value
+  gruntmaster-problem get problem_id key
 
 =head1 DESCRIPTION
 
@@ -155,6 +161,10 @@ Removes the problem with id I<id>.
 
 Sets the I<key> configuration option of problem I<id> to I<value>.
 
+=item B<get> I<id> I<key>
+
+Get the value of the I<key> configuration option of problem I<id>
+
 =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>.
This page took 0.011718 seconds and 4 git commands to generate.