summaryrefslogtreecommitdiff
path: root/crawl.pl
blob: fa7ae4e0c3964bcb39cf870b2c221614afc911a3 (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
#!/usr/bin/env perl
use strict;
use warnings;
use lib ('lib');
use githubexplorer;
use Getopt::Long;

GetOptions(
    'deploy'   => \my $deploy,
    'profiles' => \my $profiles,
    'repo'     => \my $repo
);

my $gh = githubexplorer->new(
    seed      => [qw/franckcuny/],
    api_token => $ENV{'GITHUB_APIKEY'},
    api_login => $ENV{'GITHUB_LOGIN'},
    with_repo => $repo,
    connect_info =>
        [ 'dbi:SQLite:dbname=test.sqlite', '', '', { AutoCommit => 1 } ],
);

$gh->deploy if $deploy;
$gh->harvest_profiles;