Python package for reading git logs
Example usage:
import argparse
import webbrowser
from datetime import datetime
import get_git_logs as gl
# Example
# python example_gl.py --git_folder <git_folder> --from_date 2023-08-01 --output_csv ~/git-functions/commit_logs.csv
def main():
parser = argparse.ArgumentParser(description='List Git commit logs for a given folder')
parser.add_argument('--git_folder', type=str, help='Path to the Git repository folder')
parser.add_argument('--from_date', type=str, help='Filter commits from the specified date (YYYY-MM-DD)')
parser.add_argument('--output_csv', type=str, help='Specify the output CSV file')
args = parser.parse_args()
git_folder = args.git_folder
from_date_str = args.from_date
from_date = datetime.strptime(from_date_str, '%Y-%m-%d') if from_date_str else None
commit_logs = gl.get_git_commit_logs(git_folder, from_date)
if args.output_csv:
output_csv = args.output_csv
gl.save_to_csv(commit_logs, output_csv)
print(f'Commit logs saved to {output_csv}')
# Copy CSV content to clipboard
with open(output_csv, 'r') as csv_file:
csv_content = csv_file.read()
gl.copy_to_clipboard(csv_content)
print('CSV content copied to clipboard')
# Open the specified URL with the CSV data
web_url = f'https://mohan-chinnappan-n5.github.io/viz/datatable/dt.html?c=csv'
webbrowser.open(web_url)
else:
print('Commit Logs:')
for commit in commit_logs:
print(commit)
main()
Metadata
Release files for gitlogs-mohanchinnappan 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gitlogs_mohanchinnappan-0.0.11.tar.gz | 2.9 kB | Without provenance | Details for gitlogs_mohanchinnappan-0.0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gitlogs_mohanchinnappan-0.0.11-py3-none-any.whl | Python 3 | none | any | Details for gitlogs_mohanchinnappan-0.0.11-py3-none-any.whl |
Total release size: 5.7 kB
Release files / gitlogs_mohanchinnappan-0.0.11.tar.gz
| Download URL | gitlogs_mohanchinnappan-0.0.11.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abe3387721c29662f395921c88d5a4aa8780df3b2fd36365d4f6af2726d7b092
|
|
BLAKE2b-256 checksum How to use checksums |
27e0377ba51767f832387822434f6a0116011342929a6bf47b701e2ab28fedff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / gitlogs_mohanchinnappan-0.0.11-py3-none-any.whl
| Download URL | gitlogs_mohanchinnappan-0.0.11-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7001d6646b605f076573f5eb8b2bdb4823dff2d858f8820d20f03689766d903
|
|
BLAKE2b-256 checksum How to use checksums |
c91a98511847e077d24a92e00d56ffacba28ef5da2bffb2a6caebbf53a776c72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for gitlogs-mohanchinnappan 0.0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.