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.2.0.tar.gz (3.8 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.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for github_commit_line_stats-1.2.0.tar.gz
Algorithm Hash digest
SHA256 cf119c8598b9510e9e9f504f908989e2399c821382dd595cbb833f06a76312ec
MD5 244e7bf77b6907e19015554196f5a783
BLAKE2b-256 3b5865b17b019a311dd17ace68ef69df2097150d79f41fa248863f4363cdd504

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for github_commit_line_stats-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9863f50b0f912555cec8e86cce0d257b6a98f167205c363f2c0e82af7329872
MD5 565ae4ed46f5cac71c36dead2fec0585
BLAKE2b-256 a3cb2265d1803eed0bd659043c233fada3f8d3e3c49c9c84cfe7dd639f0719d1

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