benfinke / collective-intelligence-framework

Automatically exported from code.google.com/p/collective-intelligence-framework
0 stars 0 forks source link

-p csv doesn't map groupid #150

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Despite setting -G, the csv does not map guid to groupName.  I wrote quick
patch to convert the guid to groupName in the Csv.pm module.  Not sure if
it's useful, but thought I'd pass it along (attached).

--- /usr/local/share/perl/5.10.1/CIF/Client/Plugin/...csv.pm    2012-03-27 
14:19:04.134458224 -0500
+++ /usr/local/share/perl/5.10.1/CIF/Client/Plugin/Csv.pm   2012-01-31 
10:06:23.000000000 -0600
@@ -1,4 +1,4 @@
-package CIF::Client::Plugin::...csv;
+package CIF::Client::Plugin::Csv;

 use Regexp::Common qw/net/;

@@ -8,10 +8,6 @@
     my $self = shift;
     my $config = shift;
     my $feed = shift;
-    my $hash = $feed->{'feed'};
-    my $group_map = ($config->{'group_map'}) ? $hash->{'group_map'} : undef;
-    my $feed_guid = $hash->{'guid'};
-
     my @array = @{$feed->{'feed'}->{'entry'}};

     $config = $config->{'config'};
@@ -25,9 +21,6 @@
     }
     @header = sort { $a cmp $b } @header;
     my $body = '';
-    if($group_map){
-      map { $_->{'guid'} = $group_map->{$_->{'guid'}} } @array;
-    }
     foreach my $a (@array){
         delete($a->{'message'}); 
         # there's no clean way to do this just yet

Original issue reported on code.google.com by saxjazm...@gmail.com on 28 Mar 2012 at 11:28

GoogleCodeExporter commented 9 years ago
https://github.com/collectiveintel/cif-client-perl/commit/b4858f400ec4e4fe470d37
f4cd1b03381c1ad8e9

Original comment by saxjazm...@gmail.com on 4 Apr 2012 at 11:41