https://github.com/ppebb/metrics
Generate a language usage graph for a Github profile
https://github.com/ppebb/metrics
github github-profile profile-card readme-generator
Last synced: 27 days ago
JSON representation
Generate a language usage graph for a Github profile
- Host: GitHub
- URL: https://github.com/ppebb/metrics
- Owner: ppebb
- Created: 2025-01-21T06:26:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-05T02:04:30.000Z (over 1 year ago)
- Last Synced: 2025-03-05T03:18:39.548Z (over 1 year ago)
- Topics: github, github-profile, profile-card, readme-generator
- Language: Go
- Homepage:
- Size: 141 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ppeb's metrics
"Simple" Go project to generate a language graph for your repositories,
intended to be run locally.
## Building
0. Have the Go compiler installed
1. `git clone https://github.com/ppebb/metrics.git`
2. `go build`
## Usage
```
./ppebtrics [OPTIONS]
-h|--help Display this message and exit
-c|--config Specify the path to your config.yml
-o|--output Specify the output path of your svg
-d|--dry-run Dry run! List the repos to be cloned and analyzed
-s|--silent Don't output to stdout
-f|--force Ignore the lockfile, run even if it is present
```
## Config
See `example.config.yml` for a template.
location (`string`): The path to store repositorites at.
indepth (`boolean`): Whether to index every commit, or just count the lines of
each file as they are in the latest commit.
counttotal (`boolean`): When true, diffs are calculated as added - removed.
When false, diffs are calculated as added + removed.
countspaces (`boolean`): When true, blank lines are included in the count.
langscount (`integer`): How many languages to display.
style.theme (`string`): Path to a theme.yml file (see `./themes`).
style.type (`string`): `"compact"` or `"vertical"`.
style.count (`string`): The metric to count, `"lines"` or `"bytes"`.
style.bytesbase (`integer`): When counting bytes, whether to use metric or
binary prefixes (MB vs MiB).
style.showtotal (`boolean`): Whether to include a line displaying the total
number of lines/bytes and files beneath the header.
token (`string`): A Github access token with the repository scope, only if you
want to count private repositories.
excludeforks (`boolean`): Should forks be included in counts.
parallel (`integer`): How many goroutines to spawn at once. Higher will count
faster but may encounter network bottlenecks when cloning.
users (`[]string`): Users to count repositories of.
orgs (`[]string`): Organizations to count repositories of.
repositories (`[]string`): Repositories to count. Not subject to filters.
authors (`[]string`): When counting in-depth, the author strings used to match
commits to consider (see the `--author` option of `git-log`).
filters (`[]string`): Regex patterns used to match repositories to exclude.
commits (`[]string`): List of 6-character commit hashes to exclude.
ignore.enryvendor (`boolean`): Whether to ignore files identified by go-enry as vendored.
ignore.linguistvendor (`boolean`): Whether to ignore files identified by `.gitattributes` as vendored.
ignore.dotfiles (`boolean`): Whether to ignore files identified by go-enry as dotfiles.
ignore.binary (`boolean`): Whether to ignore files identified by go-enry as binary.
ignore.configuration (`boolean`): Whether to ignore files identified by go-enry as configuration.
ignore.image (`boolean`): Whether to ignore files identified by go-enry as images.
ignore.test (`boolean`): Whether to ignore files identified by go-enry as tests.
ignore.generated (`boolean`): Whether to ignore files identified by go-enry as generated.
ignore.langs (`[]string`): List of languages to exclude from results.
postexec (`string`): String passed to `sh -c` to be executed after processing
repositories. Useful to copy the generated svg to a remote server for hosting.
## Credit
This project is loosely based upon
[lowlighter/metrics](https://github.com/lowlighter/metrics) and
[anuraghazra/github-readme-stats](https://github.com/anuraghazra/github-readme-stats)
for SVG styling.
[go-enry](https://github.com/go-enry/go-enry) is used to identify the languages
of each file.