Skip to content

A library of NodeJS tool to summarize git commit for year-end report. 为年终报告总结 git commit log 的 NodeJS 小工具

License

Notifications You must be signed in to change notification settings

kabeep/yeareport

Repository files navigation

yeareport

A NodeJS tool for summarizing git commits for annual reports, automatically generating Markdown


📖 Introduction

year-report is a tool dedicated to serving individuals, assisting in writing annual reports.

It can help you:

  • Summarize personal git work logs

  • Output pretty Markdown

  • Extract a list and count of specified work types

How it differs from changelog-cli:

  • Focused on serving individuals

  • Flexible and controllable time range

  • More controllable output result modes

  • Better standard material designed for developers writing annual reports

  • Pre-parse data fed to GPT

Markdown output result demonstration

default_example

⚙️ Installation

  1. Clone the repository
git clone https://github.com/kabeep/yeareport.git
  1. Installation dependency
cd yeareport

# NPM
npm install

# or Yarn
yarn
  1. Compile program
npm run build
  1. NPM soft link
npm link
  1. Test
yeareport -h

🚀 Usage

Usage

yeareport <command> [options]

Command:
  yeareport add     Add the current directory to the queue
  yeareport remove  Remove the current working directory from the queue
                                                                   [aliases: rm]
  yeareport clear   Clear the queue                               [aliases: clr]
  yeareport print   Output the queue as a markdown file           [aliases: ptr]
  yeareport show    Show the list of logs in the queue

Options:
      --author     When `auto`, look up from git global config, default to
                   output all logs                                      [string]
      --since      Start outputting from a certain date, default to `2023-01-01`
                                                                        [string]
      --before     End outputting on a certain date, default to `2024-01-01`
                                                                        [string]
      --output     print output directory, relative to the current working
                   directory, default `User/Downloads`                  [string]
  -o, --overwrite  add overwrite authorization, perform overwrite operation when
                   the current working directory already exists
                                                          [bool] [default: false]
  -p, --pretty     print beautify the title, use emoji to beautify Markdown
                   titles                                 [bool] [default: false]
  -h, --help       Display help information                                [bool]
  -v, --version    Show version number                                     [bool]

Example:
  yeareport add -o                          Authorize the add command to
                                            overwrite when logs of the current
                                            working directory are already in the
                                            queue
  yeareport add --author=kabeep             Only add logs of author kabeep to
                                            the queue
  yeareport add --since=2023-01-01          Add logs from 2023-01-01 to
  --before=2024-01-01                       2024-01-01 to the queue
  yeareport print -p                        Markdown titles will output `#
                                            {emoji} {commit-type}`

🎯 RoadMap

  • Statistical analysis and word segmentation

  • Percentage calculation

  • Trend chart

  • Gantt chart

🤝 Contribution

Contributions via Pull Requests or Issues are welcome.

📄 License

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

About

A library of NodeJS tool to summarize git commit for year-end report. 为年终报告总结 git commit log 的 NodeJS 小工具

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published