Skip to main content

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 cmsgitlogs 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmsgitlogs 0.0.2
File Size Uploaded Provenance Actions
cmsgitlogs-0.0.2.tar.gz 2.8 kB Without provenance Details for cmsgitlogs-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cmsgitlogs 0.0.2
File Interpreter ABI Platform Actions
cmsgitlogs-0.0.2-py3-none-any.whl Python 3 none any Details for cmsgitlogs-0.0.2-py3-none-any.whl

Total release size: 5.5 kB

Release files / cmsgitlogs-0.0.2.tar.gz

Download URL cmsgitlogs-0.0.2.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c091bed97473ef688711a9f1300baa2f70ef7767c2a638063c9b23d98dcedce5
BLAKE2b-256 checksum
How to use checksums
1ce72435d4db835c3f346bc626c60cee1b2a535a4b6f3f76cdcd9d752f7ebc55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / cmsgitlogs-0.0.2-py3-none-any.whl

Download URL cmsgitlogs-0.0.2-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1e2ddaa2dcbe368d86841c3e5b30381e666ad567b70507d5997b62ce17dbf68
BLAKE2b-256 checksum
How to use checksums
41d10c5328cfa81d2a5d182008ba8fb4505f2336a5d7a927296153dcdeb281db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for cmsgitlogs 0.0.2

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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page