Giter Club home page Giter Club logo

git_history's Introduction

Git Log Parser Script

Overview:

This script parses Git logs to extract commit messages associated with JIRA cards. It organizes the parsed data into a tabulated format, displaying dates, corresponding weekdays, and time track messages.

Requirements:

  • Python 3.x
  • Git installed and configured
  • Required Python packages: argparse, datetime, logging, os, re, subprocess, dataclasses, tabulate

Usage:

  1. Clone the Repository: Ensure you have the repository cloned locally and navigate to its directory.

  2. Run the Script:

    • Open a terminal in the directory where the script resides.
    • Execute the script with appropriate arguments.
    python script_name.py [-p PROJECT_DIR] [-l LAST_DAYS] [-s START_DATE]
    • PROJECT_DIR: Optional. Path to the project directory. Default is the current directory.
    • LAST_DAYS: Optional. Number of business days to go back in history. Default is 30 days.
    • START_DATE: Optional. Set a specific start date in the format YYYY-MM-DD.
  3. View Results: The script generates a tabulated output showing the parsed Git log data.

Example:

python git_log_parser.py -p /path/to/project -l 45 -s 2024-04-01

This command retrieves Git logs from the project directory /path/to/project, spanning the last 45 business days, starting from April 1, 2024.

Output:

The output consists of a table displaying the following columns:

  • Date: Date of the log entry.
  • Day of Week: Corresponding weekday.
  • Time Track Message: Commit messages associated with JIRA cards for that day.

Additionally, missing days (without commits) within the specified timeframe are displayed with empty message fields.

Adding as an alias:

echo "alias tt='python /path/to/git_log_parser.py'" >> ~/.bashrc

git_history's People

Watchers

iklobato avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.