Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

sourcecred/widgets

SourceCred Widgets

Build Status Discourse topics Discord Greenkeeper badge

A Node.js based set of tools to interpret SourceCred scores and generate widgets. For example to use in README's or as webpage static assets.

Example usage

# 1. Use the main sourcecred's score feature to export scores to a file.
SOURCECRED_GITHUB_TOKEN=YOUR_GITHUB_TOKEN \
  node PATH_TO_SOURCECRED/bin/sourcecred.js load sourcecred/sourcecred
node PATH_TO_SOURCECRED/bin/sourcecred.js scores sourcecred/sourcecred \
  > scores.json

# 2. Install and build this package.
yarn
yarn -s build

# 3. Generate a contributor wall SVG.
./bin/contributor-wall-svg.js < scores.json > contributors.svg

Or using the Docker equivalent of this.

# 1. Use the main sourcecred image to export scores to a file.
SOURCECRED_GITHUB_TOKEN=YOUR_GITHUB_TOKEN \
  docker run --rm -ti -v sourcecred_data:/data -e SOURCECRED_GITHUB_TOKEN \
  sourcecred/sourcecred load sourcecred/sourcecred
docker run --rm -ti -v sourcecred_data:/data sourcecred/sourcecred scores \
  sourcecred/sourcecred > scores.json

# 2. To build a Docker image with your changes. Or skip this to use a release from Dockerhub.
docker build -t sourcecred/widgets .

# 3. Generate a contributor wall SVG.
# Note: don't use the -t option here, it will produce an error "the input device is not a TTY".
docker run --rm -i sourcecred/widgets < scores.json > contributors.svg

Contributors

Many thanks to the people who have contributed to this repository.

sourcecred/widgets contributors

Based on all-time SourceCred scores.

About

No description, website, or topics provided.

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •