pygitloc


Namepygitloc JSON
Version 0.5 PyPI version JSON
download
home_pagehttps://github.com/yourusername/pygitloc
SummaryA package to calculate lines of code from a GitHub repository link
upload_time2024-07-02 10:47:28
maintainerNone
docs_urlNone
authorShubham Shinde
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pygitloc

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

## Installation

To install the package, use:

```bash
pip install pygitloc==0.5
```

## Usage

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

```bash
pygitloc <github-link>
```

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

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

## Requirements

This package relies on the following dependencies:

- [GitPython](https://pypi.org/project/GitPython/)
- [PyGithub](https://pypi.org/project/PyGithub/)
- [cloc](https://github.com/AlDanial/cloc)

## 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

```bash
$ 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](LICENSE) file for details.

## Acknowledgments

- [GitPython](https://github.com/gitpython-developers/GitPython)
- [PyGithub](https://github.com/PyGithub/PyGithub)
- [cloc](https://github.com/AlDanial/cloc)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yourusername/pygitloc",
    "name": "pygitloc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Shubham Shinde",
    "author_email": "shubhamshindesunil@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/78/fe/3c592a81f6e47c976031b45f88ceaafe42271ccb73145799abaebee37495/pygitloc-0.5.tar.gz",
    "platform": null,
    "description": "# pygitloc\r\n\r\nA package to calculate lines of code from a GitHub repository link.\r\n\r\n## Installation\r\n\r\nTo install the package, use:\r\n\r\n```bash\r\npip install pygitloc==0.5\r\n```\r\n\r\n## Usage\r\n\r\nTo calculate the lines of code from a GitHub repository, run:\r\n\r\n```bash\r\npygitloc <github-link>\r\n```\r\n\r\nReplace `<github-link>` with the URL of the GitHub repository you want to analyze. For example:\r\n\r\n```bash\r\npygitloc https://github.com/yourusername/your-repo\r\n```\r\n\r\n## Requirements\r\n\r\nThis package relies on the following dependencies:\r\n\r\n- [GitPython](https://pypi.org/project/GitPython/)\r\n- [PyGithub](https://pypi.org/project/PyGithub/)\r\n- [cloc](https://github.com/AlDanial/cloc)\r\n\r\n## How It Works\r\n\r\n1. The `pygitloc` command clones the specified GitHub repository to a temporary directory.\r\n2. It then uses `cloc` to count the lines of code in the cloned repository.\r\n3. Finally, it outputs the results and cleans up the temporary directory.\r\n\r\n## Example\r\n\r\n```bash\r\n$ pygitloc https://github.com/torvalds/linux\r\nCloned https://github.com/torvalds/linux to temp_repo\r\n     1973 text files.\r\n     1953 unique files.\r\n      1824 files ignored.\r\n\r\ngithub.com/shubhamshnd/cloc v 1.88  T=18.00 s (61.6 files/s, 5762.4 lines/s)\r\n-------------------------------------------------------------------------------\r\nLanguage                     files          blank        comment           code\r\n-------------------------------------------------------------------------------\r\nC                             1180         252635         329417        2046599\r\nAssembly                       159          16646          27585         108099\r\nC/C++ Header                   270          57480         152239          96316\r\n...\r\n-------------------------------------------------------------------------------\r\n\r\n# Clean up\r\n```\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Acknowledgments\r\n\r\n- [GitPython](https://github.com/gitpython-developers/GitPython)\r\n- [PyGithub](https://github.com/PyGithub/PyGithub)\r\n- [cloc](https://github.com/AlDanial/cloc)\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A package to calculate lines of code from a GitHub repository link",
    "version": "0.5",
    "project_urls": {
        "Homepage": "https://github.com/yourusername/pygitloc"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a51a09d2bbb20c4a4609c75e2f6cac20a59f8000e3a10ccd8e08fc6d2ad8983",
                "md5": "e33d17962a869aab874a2d884fb11b00",
                "sha256": "5158992e28c143f351b3f59d2c0e18f7e70eb297ba3405cb541f44b2951c9d46"
            },
            "downloads": -1,
            "filename": "pygitloc-0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e33d17962a869aab874a2d884fb11b00",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 3166,
            "upload_time": "2024-07-02T10:47:26",
            "upload_time_iso_8601": "2024-07-02T10:47:26.280578Z",
            "url": "https://files.pythonhosted.org/packages/7a/51/a09d2bbb20c4a4609c75e2f6cac20a59f8000e3a10ccd8e08fc6d2ad8983/pygitloc-0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78fe3c592a81f6e47c976031b45f88ceaafe42271ccb73145799abaebee37495",
                "md5": "193dd041b88b6d058e93dab3ed34df04",
                "sha256": "de835eaedcd8712a6c6e70908edb5ca134c7cb62c8cbeef734b689d48036205e"
            },
            "downloads": -1,
            "filename": "pygitloc-0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "193dd041b88b6d058e93dab3ed34df04",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 2888,
            "upload_time": "2024-07-02T10:47:28",
            "upload_time_iso_8601": "2024-07-02T10:47:28.466655Z",
            "url": "https://files.pythonhosted.org/packages/78/fe/3c592a81f6e47c976031b45f88ceaafe42271ccb73145799abaebee37495/pygitloc-0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-02 10:47:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "pygitloc",
    "github_not_found": true,
    "lcname": "pygitloc"
}
        
Elapsed time: 1.20119s