From: Marius Gavrilescu Date: Thu, 10 Apr 2014 09:43:32 +0000 (+0300) Subject: Add get subcommand to gruntmaster-problem X-Git-Tag: 5999.000_003~13 X-Git-Url: http://git.ieval.ro/?p=gruntmaster-data.git;a=commitdiff_plain;h=5214523a16467b3ce47a7b5783f5171c419e80a5 Add get subcommand to gruntmaster-problem --- diff --git a/gruntmaster-problem b/gruntmaster-problem index 724a17e..1b240e0 100755 --- a/gruntmaster-problem +++ b/gruntmaster-problem @@ -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. Sets the I configuration option of problem I to I. +=item B I I + +Get the value of the I configuration option of problem I + =item B --file I I I Sets the I configuration option of problem I to the contents of the file I.