summary refs log tree commit diff
path: root/lib/githubexplorer/Gexf.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/githubexplorer/Gexf.pm')
-rw-r--r--lib/githubexplorer/Gexf.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/githubexplorer/Gexf.pm b/lib/githubexplorer/Gexf.pm
index 652800e..503eebe 100644
--- a/lib/githubexplorer/Gexf.pm
+++ b/lib/githubexplorer/Gexf.pm
@@ -50,9 +50,13 @@ sub profiles {
         my $node = {
             id              => $profile->id,
             label           => $profile->login,
-            name            => $profile->name,
-            followers_count => $profile->followers_count,
-            following_count => $profile->following_count,
+            attvalues => {
+                attvalue => [
+                    {name            => $profile->name},
+                    {followers_count => $profile->followers_count},
+                    {following_count => $profile->following_count},
+                ]
+            },
         };
         push @{ $self->graph->{gexf}->{graph}->{nodes}->{node} }, $node;
     }
@@ -62,12 +66,12 @@ sub profiles {
     while ( my $edge = $edges->next ) {
         my $e = {
             cardinal => 1,
-            source   => $edge->origin,
-            target   => $edge->source,
+            source   => $edge->origin->id,
+            target   => $edge->dest->id,
             type     => 'dir',
             id       => $id++,
         };
-        push @{ $self->graph->{gexf}->{graph}->{eges}->{edge} }, $e;
+        push @{ $self->graph->{gexf}->{graph}->{edges}->{edge} }, $e;
     }
 
     my $xml_out = XMLout( $self->graph, AttrIndent => 1, keepRoot => 1 );