From a7cc690ced15e1a0191d27034006bfb17a0deeb5 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sat, 23 Jan 2010 19:36:24 +0100 Subject: basic github crawler using api --- crawl.pl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 crawl.pl (limited to 'crawl.pl') diff --git a/crawl.pl b/crawl.pl new file mode 100644 index 0000000..fa7ae4e --- /dev/null +++ b/crawl.pl @@ -0,0 +1,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; + -- cgit v1.2.3