Skip to main content

A package to calculate lines of code from a GitHub repository link

Project description

pygitloc

A package to calculate lines of code from a GitHub repository link.

Installation

To install the package, use:

pip install pygitloc

Usage

To calculate the lines of code from a GitHub repository, run:

pygitloc <github-link>

Replace <github-link> with the URL of the GitHub repository you want to analyze. For example:

pygitloc https://github.com/yourusername/your-repo

Requirements

This package relies on the following dependencies:

How It Works

  1. The pygitloc command clones the specified GitHub repository to a temporary directory.
  2. It then uses cloc to count the lines of code in the cloned repository.
  3. Finally, it outputs the results and cleans up the temporary directory.

Example

$ pygitloc https://github.com/torvalds/linux
Cloned https://github.com/torvalds/linux to temp_repo
     1973 text files.
     1953 unique files.
      1824 files ignored.

github.com/shubhamshnd/cloc v 1.88  T=18.00 s (61.6 files/s, 5762.4 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                             1180         252635         329417        2046599
Assembly                       159          16646          27585         108099
C/C++ Header                   270          57480         152239          96316
...
-------------------------------------------------------------------------------

# Clean up

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

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

pygitloc-0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

pygitloc-0.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file pygitloc-0.1.tar.gz.

File metadata

  • Download URL: pygitloc-0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for pygitloc-0.1.tar.gz
Algorithm Hash digest
SHA256 d139ce946bb8af6504e76a8538912fd112f2afe759991cb7a87a7748d0e9a6f6
MD5 e9c98222526693445ed68d1f8741fa22
BLAKE2b-256 768d0a76683aa08be1d3354153468213d54f704c972cb4fa0732b68b7e697ce0

See more details on using hashes here.

File details

Details for the file pygitloc-0.1-py3-none-any.whl.

File metadata

  • Download URL: pygitloc-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for pygitloc-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4abf2f4dec88f4e5ef9a3cd45042c4eb8614d031a37d27097a8949e434381679
MD5 68b7266e1cb45763a2796aa7131cd580
BLAKE2b-256 de23bbedb2b5727c4a63d6c7131b4d7a44b52e08eb4f9fd5885ec569eb8b82df

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