summary refs log tree commit diff
path: root/crawl.pl
blob: 300cfd547574f6887959abe7153a4b8a7c65c9b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env perl
use strict;
use warnings;
use lib ('lib');
use githubexplorer;
use Getopt::Long;
use YAML::Syck;

GetOptions(
    'deploy'   => \my $deploy,
    'profiles' => \my $profiles,
    'repo'     => \my $repo,
    'graph'    => \my $graph,
    'network'  => \my $network,
    'seed'     => \my $seed,
    'conf=s'   => \my $conf,
);

my $conf_data = LoadFile($conf);

my $gh = githubexplorer->new(
    seed         => [qw/franckcuny/],
    api_token    => $ENV{'GITHUB_APIKEY'},
    api_login    => $ENV{'GITHUB_LOGIN'},
    with_repo    => $repo,
    connect_info => $conf_data->{connect_info},
);

$gh->deploy           if $deploy;
$gh->harvest_profiles if $profiles;
$gh->harvest_repo     if $repo;
$gh->graph_repo       if $network;
$gh->gen_graph        if $graph;
$gh->gen_seed         if $seed;