From 5254c0d574499e920b39501d36144e0f92bd5d1f Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Fri, 9 May 2008 02:24:36 -0500 Subject: add 'braindump' command --- lib/App/Hiveminder/Command/Braindump.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/App/Hiveminder/Command/Braindump.pm diff --git a/lib/App/Hiveminder/Command/Braindump.pm b/lib/App/Hiveminder/Command/Braindump.pm new file mode 100644 index 0000000..92786f3 --- /dev/null +++ b/lib/App/Hiveminder/Command/Braindump.pm @@ -0,0 +1,25 @@ +#!/usr/bin/perl +package App::Hiveminder::Command::Braindump; +use Moose; +use App::Hiveminder::Utils qw/get_text_from_editor display_tasks/; +extends 'App::Hiveminder::Command'; + +=head2 NAME + +App::Hiveminder::Command::Braindump - Create several tasks at once + +=cut + +sub command_names { qw/braindump bd/ } + +sub command { + my ($self, $args) = @_; + + my $text = get_text_from_editor; + return display_tasks($self->hm->braindump($text, returns => 'tasks', + tokens => [@$args])) + unless $text eq ''; + return ''; +} + +1; -- cgit v1.2.3-54-g00ecf