]> iEval git - gruntmaster-data.git/commitdiff
Add show_job and show_user to gm command
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 2 Oct 2015 11:26:21 +0000 (14:26 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 2 Oct 2015 11:26:21 +0000 (14:26 +0300)
lib/Gruntmaster/App/Command/Show.pm

index 37920980df94e45e3cdd2b5a23620bd491678def..45f3eefcf2348b22d8f04b1a1c543c69c9938007 100644 (file)
@@ -43,6 +43,22 @@ Stop: $columns{stop}
 END
 }
 
+sub show_job {
+       my (%columns) = @_;
+       $columns{date} = strftime '%c', localtime $columns{date};
+
+       no warnings 'uninitialized';
+       print <<END
+Problem: $columns{problem}
+Contest: $columns{contest}
+Owner: $columns{owner}
+Date: $columns{date}
+Private: @{[$columns{private} ? 'Yes' : 'No']}
+Format: $columns{format}
+Result: $columns{result} ($columns{result_text})
+END
+}
+
 sub show_problem {
        my (%columns) = @_;
 
@@ -65,5 +81,22 @@ Output limit (bytes): $columns{olimit}
 END
 }
 
+sub show_user {
+       my (%columns) = @_;
+       $columns{since} = strftime '%c', localtime $columns{since};
+
+       no warnings 'uninitialized';
+       print <<END
+Email: $columns{name} <$columns{email}>
+Phone: $columns{phone}
+Since: $columns{since}
+Admin: @{[$columns{admin} ? 'Yes' : 'No']}
+Level: $columns{level}
+University: $columns{university}
+Town: $columns{town}
+Country: $columns{country}
+END
+}
+
 1;
 __END__
This page took 0.020702 seconds and 4 git commands to generate.