Skip to main content

Count how many lines of code you commit on GitHub! (Count by file extension)

Project description

GitHub Commit Line Stats

Count how many lines of code you commit on GitHub! (Count by file extension)

python -m ghcls --token <YOUR GITHUB TOKEN>
python -m ghcls -h
usage: __main__.py [-h] -t TOKEN [-u USER] [-c CACHE] [-o OUTPUT]

GitHub Commit Line Stats

options:
  -h, --help           show this help message and exit
  -t, --token TOKEN    GitHub Personal Access Token
  -u, --user USER      GitHub Username (Optional)
  -c, --cache CACHE    Cache directory for commits
  -o, --output OUTPUT  Output file for commit stats
from ghcls import get_additions_of_user, get_language_by_filename
gh = Github(your_gh_token)
user = gh.get_user(your_username)
totals = get_additions_of_user(user, token, cache, get_language_by_filename)
# You can customize your language detector by changing get_language_by_filename
pathlib.Path(output).write_text(json.dumps(totals, indent=2))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

github_commit_line_stats-1.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

github_commit_line_stats-1.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file github_commit_line_stats-1.1.0.tar.gz.

File metadata

File hashes

Hashes for github_commit_line_stats-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c47c6b89c4e0a6f7428f2d65701ac19d4142013e7caf2dbe64c85921425279ef
MD5 07ede289d502730ceb74a9a7e1478573
BLAKE2b-256 7cdbd3ab3d8b6849be8d872c391a176eda7fa325ca6f7b50b2feac85640dcdbd

See more details on using hashes here.

File details

Details for the file github_commit_line_stats-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for github_commit_line_stats-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 274a7eb6e4a3511e2be1be358e1c28e978240fd18ff3e05286afe3aec4130967
MD5 4f10a78cb7e7081a53496fa0d7e0079f
BLAKE2b-256 203f67e73f1576a09be7689ae9d75d21bf72831c39318d5c9788c99b5a674f47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page