Project meetings are boring right?!? Generating boring action points/minutes of meeting docs in MS Word is even worse!!!

This is why I have recently put together this simple script for generating action points from meetings for directly pasting onto the bodies of emails (i.e. nothing too formal). This makes use of Text::Fold, Text::TabularDisplay and YAML::XS, although I found that I had to hack the text going into Text::TabularDisplay so as not to get paragraphs starting with a space. Maybe I am doing something not 100% correct but the script works and I am very happy with it...

#!c:/perl/bin/perl.exe -w use Modern::Perl; use YAML::XS; use Data::Dumper; use Text::TabularDisplay; use Text::Fold; # Note: use YAML::XS not YAML to appropriately handle # multiline blocks. Do this in Windows: # 'perl -MCPAN -e shell' # then 'install YAML::XS' # ** This won't be available from the PPM GUI in Windows ** my $yml; { local $/ = undef; $yml = <DATA>; } my (@arr) = Load($yml); my $table = Text::TabularDisplay->new(qw(ID Description By Date)); my $count; sub add_to_table { my ($desc, $area, $resp, $by) = @_; $count++; # count defined outside sub and captured by closure (my $s = fold_text("$area: $desc", 62, { soft_hyphen_threshold => 10 })) =~ s/^\s+//mg; my @row = ($count, $s, $resp, $by); $table->add(@row); # table defined outside and captured by closure } # map called in void context with the express purpose of invoking # the handy side-effect of the add_to_table sub which appends # each record as row into the tabular display referenced by # the $table var map { add_to_table($_->{description}, $_->{area}, $_->{responsible}, $_->{by} ) } sort { $a->{area} <=> $b->{area} || $a->{responsible} cmp $b->{responsible} } @arr; say $table->render; __DATA__ --- description: Mickey was asked by Minie to attend UAT at Western Controls on the 17/08 area: 1200 responsible: Mickey by: 17/08 --- description: Mickey indicated that he experienced problems with some labels for Area 1210 and requested that the inspection of the labels for areas 1210 and 1128 be postponed to Wednesday area: 1210 responsible: Mickey by: 19/08 ...
and the output... (adjusted to fit here):
+----+--------------------------------------------+--------+-------+ | ID | Description | By | Date | +----+--------------------------------------------+--------+-------+ | 1 | 1200: Mickey were asked by Minie to attend | Mickey | 17/08 | | | UAT at Western Controls on the 17/08 | | | | 2 | 1210: Mickey indicated that we experienced | Mickey | 19/08 | | | problems with some labels for Area 1210 | | | | | and requested that the inspection of the | | | | | labels for areas 1210 and 1128 be | | | | | postponed to Wednesday | | | +----+--------------------------------------------+--------+-------+

In reply to PM101: Generating Action Points Table in Perl by ricDeez

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.