Skip to content

caesar003/gitlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitlog

Gitlog is a command-line tool that generates Git log reports across multiple repositories. Designed to simplify your workflow, gitlog automatically collects commit data for a specific author over a defined time period.

Features

  • Collects Git logs across multiple repositories.
  • Filters commits by author and time range.
  • Outputs logs to organized text files.
  • Includes autocompletion for command-line options.

Table of Contents

Installation

You can install gitlog by either running the installation script or by downloading the .deb package.

Option 1: Install via .deb Package (Recommended)

Download the latest .deb package from the releases page of this repository and install it using:

sudo dpkg -i gitlog*.deb

Option 2: Install via Installation Script

Clone the repository and run the provided installation script:

git clone https://github.com/caesar003/gitlog.git
cd gitlog
chmod +x install.sh
sudo ./install.sh

Requirements

  • Git
  • Bash
  • Root privileges (for installation)

Configuration

Main Configuration

The main configuration file is located at ~/.config/gitlog/setting.conf. Here you can set default parameters such as the repository, author, and starting date:

# ~/.config/gitlog/setting.conf
repository=sample
author=superadmin
since=2022-10-01

Repository List

Each repository you want to include in the logs should be listed in JSON files within ~/.config/gitlog/repositories/. Each JSON file should contain the list of repository paths:

// ~/.config/gitlog/repositories/sample.json
["path/to/first/repo", "path/to/second/repo", "path/to/additional/repo"]

Usage

Run gitlog with various options to generate logs or view help information.

gitlog [OPTIONS]

Options

  • -h, --help : Display help message.
  • -v, --version : Show the version number of gitlog.
  • -g, --generate : Generate Git logs based on the provided configuration.
    • -a, --author : Specify the author name.
    • -s, --since : Set the start date in YYYY-MM-DD format.
    • -n, --name : Define the repository configuration file to use.

Examples

Generate a report for superadmin from 2022-10-01 using the default repository list:

gitlog --generate --author "superadmin" --since "2022-10-01"

Specify a custom repository configuration:

gitlog --generate --name "sample"

Display help information:

gitlog --help

File Structure

  • bin/ : Contains the main gitlog executable.
  • config/ : Default configuration files.
    • repositories/ : JSON files listing repositories.
  • share/ : Man page and completion script.
    • bash-completion/ : Bash completion script for gitlog.
    • man/ : Man page file for gitlog.

Windows

Requirements

  • python3
  • git

Steps

Clone the repository

git clone https://github.com/caesar003/gitlog.git

copy configuration file into C:\Users\<user>\AppData\Roaming\gitlog\setting.conf with the following format

repo_list=<json-file-list-repo>
author=<your-name>
since=<since-date>

write repository list in JSON array in C:\Users\<user>\AppData\Roaming\gitlog\repositories\*.json, you can put as many files as you need here, the list goes like this:

[
    "C:/Users/caesar/projects/e-commerce",
    "C:/Users/caesar/projects/student-management-system"
]

How to:

Open Windows Powershell or command prompt navigate to where you clone gitlog, then descend to usr/bin and run the following command,

python gitlog.py

License

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

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.


Developed by caesar003

About

Summarize monthly activity across multiple repositories—ideal for managing multiple projects.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors