Skip to content
Use this script to extract data from your private repo. This data is used to calculate your score.
Python Dockerfile Other
Branch: master
Clone or download
codersrankOrg Merge pull request #51 from peti2001/master
Add Crystal programming language
Latest commit 77a19f9 Oct 16, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add Crystal programming language Oct 16, 2019
test Add ERB to languages detecting (#40) Oct 13, 2019
.gitattributes added headless Oct 6, 2019
Dockerfile added headless Oct 6, 2019
LICENSE Add license May 24, 2019
Makefile added headless Oct 6, 2019 Update roadmap Oct 13, 2019
build-docker.bat added headless Oct 6, 2019
install.bat Remove unused variables and fix comments May 31, 2019 Make python3 compatible May 24, 2019
requirements.txt added headless Oct 6, 2019
run-docker.bat added headless Oct 6, 2019 added headless Oct 6, 2019
run.bat removed python3 Oct 7, 2019

What is it? (Beta Test)

This script is used to extract data from your private repo. The data is used to calculate your score on

CodersRank by default only considers public repositories, however, most developers have their code in private repositories. We want to give the chance to these developers to improve their scores too by adding their private repositories.

We can understand private repos are private because of a reason. This script extracts only the most important information from the repos:

  • Number of inserted lines in each commit
  • Number of deleted lines in each commit

Other information such as remote URLs, file names, emails, names are hashed. So we can know if two commits belong to the same file but we won't know the file name.

Moreover, the output is saved to your machine and you can check what data is extracted and you can decide whether you want to share it with us or not.

How to use it

First of all, the script needs to be cloned.

git clone
cd repo_info_extractor

Docker approach

If using this approach, the host machine does not need to have any tools installed apart of Docker. Generating the repository information is as easy as:

OSX / Linux

./ <path to the repository>


run-docker.bat <path to the repository>

Using Python on the host machine approach

First, be sure you have Python and pip installed. You can download Python from or (with preinstalled packages and pip)


$ git clone
$ cd repo_info_extractor
$ ./
$ ./ path/to/repository
$ ls -al ./


$ git clone
$ cd repo_info_extractor
$ ./
$ ./ path/to/repository
$ ls -al ./


git clone
cd repo_info_extractor
python src\ path\to\repo


The provided Dockerfile builds an image that contains the Python script as well as its dependencies. To keep the final image size low, it leverages the multi-stage build functionality. The first stage installs the dependencies as well as all the required build tools. The second stage, runtime, just copies over the installled dependencies so that they can be used by the script.

In order to build a new image out of it, run make docker on Mac/Linux or build-docker.bat on Windows. It should result in codersrank/repo_info_extractor:latest image.


/usr/bin/env: ‘bash\r’: No such file or directory

If you see the following error on a Windows machine, this is due to git converting the line endings automatically. A repository level configuration has been added to stop this from happening, but the repo needs to be hard reset:

git reset --hard

If this for some reason does not work, just remove the repository and clone it again.


  1. v0.3.0: Recognize external libraries. The current script only considers the programming languages.
  2. v0.4.0: Improve language recognition. The current dummy solution only checks the file extensions.

How to contribute?

Set up working eenvironment

We recommend to use Python virtual environments. We support Python2 and Python3 too. So you must have an environment for both and test your code with Python2 and Python3.

Run UnitTests

First you have to install nose2.

pip install nose2

After that use the make file to run the tests

make test
You can’t perform that action at this time.