From 5214523a16467b3ce47a7b5783f5171c419e80a5 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 10 Apr 2014 12:43:32 +0300 Subject: [PATCH] Add get subcommand to gruntmaster-problem --- gruntmaster-problem | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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. -- 2.30.2