From c55a169ead9beb27436144923255c254d215158f Mon Sep 17 00:00:00 2001 From: franck cuny Date: Wed, 10 Feb 2010 11:07:41 +0100 Subject: update to create graph --- lib/githubexplorer.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/githubexplorer.pm') diff --git a/lib/githubexplorer.pm b/lib/githubexplorer.pm index 67e9e25..4fc5aa5 100644 --- a/lib/githubexplorer.pm +++ b/lib/githubexplorer.pm @@ -6,7 +6,8 @@ use githubexplorer::Schema; use githubexplorer::Gexf; use IO::All; -with qw/githubexplorer::Profile githubexplorer::Repository/; +with qw/githubexplorer::Profile githubexplorer::Repository +githubexplorer::Network/; has seed => ( isa => 'ArrayRef', @@ -72,4 +73,13 @@ sub gen_graph { $xml > io('crawl.gexf'); } +sub graph_repo { + my $self = shift; + $self->_connect unless $self->has_schema; + my $repos = $self->schema->resultset('Repositories')->search({fork => 0}); + while ( my $r = $repos->next ) { + $self->fetch_network($r); + } +} + 1; -- cgit v1.2.3