Skip to content

Instantly share code, notes, and snippets.

@gousiosg
Last active December 10, 2020 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gousiosg/58ce4f0d198064fc9a12 to your computer and use it in GitHub Desktop.
Save gousiosg/58ce4f0d198064fc9a12 to your computer and use it in GitHub Desktop.
GHTorrent from scratch session
#First, install RVM as per https://rvm.io
rvm install 2.5.1
rvm use 2.5.1
git clone git@github.com:gousiosg/github-mirror.git
cp config.yaml.standalone config.yaml
# Install dependencies
gem install bundler
bundle install # if this fails, remove the "gem 'mysql2'" line from the Gemspec file
# Good to go!
ruby -Ilib bin/ght-retrieve-repo -c config.yaml -s gousiosg -p **** gousiosg github-mirror
# Explore the resulting database
$ sqlite3 github.db
SQLite version 3.8.5 2014-08-15 22:37:57
Enter ".help" for usage hints.
sqlite> select * from commits limit 10;
1|77e485d808fc0ffbf31831f6c17f140041c00299|1|1|1|2015-09-25 14:01:56.000000
2|5f24525d77f2b505bb76e4729f054468fbc91ed7|1|1|1|2015-09-24 12:57:40.000000
3|7e7a133b6ab372df86cab9dbfc7f785bbc1709d7|1|1|1|2015-09-24 12:56:39.000000
4|a588788be2a8d220e40188f304758a62cb91de45|1|1|1|2015-09-24 12:51:32.000000
5|59f86a9db021aef16cde57544d00fd86e19683d2|1|1|1|2015-09-24 12:36:46.000000
6|69311b24bc8b8f2e055b26f95af1c6e32b9d4bf4|1|1|1|2015-09-24 09:32:22.000000
7|11f874ff33d6811e7d3d19d76732a2af92be288e|1|1|1|2015-09-24 09:21:39.000000
8|b78e42f06510b5686ea2934a0fbe24faf69e2897|1|1|1|2015-09-23 14:19:24.000000
9|b950902fcb6701ce170f4df79676f233c3af176d|1|1|1|2015-09-23 12:04:23.000000
10|7e67d0676d8d2e5cf630f58cd830651b6afa68b3|1|1|1|2015-08-21 11:02:55.000000
sqlite> select * from project_commits limit 10;
1|1
1|2
1|3
1|4
1|5
1|6
1|7
1|8
1|9
1|10
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment