ReadmeScore

Build Status Readme Score

Gives a complexity score for a README.

Check scores of any repo in your browser: http://scoreme.report

There's an HTTP API too!

Example score:

Repo Score
https://github.com/RolandasRazma/RRFPSBar Readme Score
https://github.com/JRG-Developer/MediaRSSParser Readme Score
https://github.com/ruslanskorb/RSDayFlow Readme Score
https://github.com/samnung/AFHTTPFileUpdateOperation Readme Score
https://github.com/schneiderandre/ASCFlatUIColor Readme Score
https://github.com/daltoniam/BootstrapUIKit Readme Score
https://github.com/AFNetworking/AFNetworking Readme Score
https://github.com/tomersh/AppleGuice Readme Score
https://github.com/kevindelord/DKHelper Readme Score
https://github.com/saturngod/IAPHelper Readme Score
https://github.com/alskipp/ASValueTrackingSlider Readme Score
https://github.com/phranck/CNTreeNode Readme Score
https://github.com/dasdom/DDHDynamicViewControllerTransitions Readme Score
https://github.com/RestKit/RestKit Readme Score

Installation

Add this line to your application's Gemfile:

gem 'readme-score'

And then execute:

$ bundle

Or install it yourself as:

$ gem install readme-score

Usage

Pass in a URL:

url = "https://raw.githubusercontent.com/AFNetworking/AFNetworking/master/README.md"
score = ReadmeScore.for(url)
score.total_score
# => 95

Pass in a Github Repo:

score = ReadmeScore.for("afnetworking/afnetworking")
score.total_score
# => 95

Pass in HTML:

html = "AFNetworking is a delightful networking library for iOS and Mac OS X...."
score = ReadmeScore.for(html)
score.total_score
# => 95

Configuration

Settings

  • ReadmeScore.use_github_api = <boolean> - whether or not to use the Github API when loading a Github repo's readme. If false, will attempt to find the correct readme URL without the API (which could fail unexpectedly). Defaults to true

  • ReadmeScore.github_api_token = <token> - a token to use with the Github API. Supercedes the ENV variable.

Environment Variables

ENV Description
READMESCORE_GITHUB_TOKEN If scoring a Github repo, ReadmeScore will try to grab the canonical representation via the Github API. By default, unauthenticated requests are limited to 60/hour. Set this env variable to increase that limited to 5k/hour.