Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

git-candlestick

Gitコミット履歴を株価のローソク足チャートのように可視化するツール。

各コミットを1本のローソク足として、コードベースの総行数の推移を表現します。

ローソク足の定義

要素定義
始値 (Open)コミット前の総行数
終値 (Close)コミット後の総行数
高値 (High)始値 + 追加行数
安値 (Low)始値 - 削除行数
陽線 (緑)終値 > 始値
陰線 (赤)終値 < 始値

インストール

uv (推奨)

cd git-candlestick/
# 直接実行(インストール不要)
uv run git_candlestick.py /path/to/repo
# または開発用にインストール
uv pip install -e .
git-candlestick /path/to/repo

pip

pip install -e .

システムPython (Arch Linux)

sudo pacman -S python-plotly python-pandas
python git_candlestick.py /path/to/repo

使い方

# 基本
git-candlestick /path/to/repo
# ブラウザで表示(デフォルト)
git-candlestick .# HTMLにエクスポート
git-candlestick . -o chart.html
# CDN使用(軽量HTML、Web公開向け)
git-candlestick . -o chart.html --cdn
# コミットメッセージ・作者を非表示(公開向け)
git-candlestick . -o chart.html --cdn --hide-message

オプション

オプション説明
-o, --output FILEHTMLファイルに出力
-b, --branch BRANCH対象ブランチを指定
-s, --since DATE開始日 (例: 2024-01-01, 1 month ago)
-u, --until DATE終了日 (例: 2024-12-31, yesterday)
-p, --pattern GLOBファイルパターン (例: *.py, *.go)
-n, --limit N最新N件のコミットのみ
--hide-messageコミットメッセージと作者を非表示
--cdnplotly.jsをCDNから読み込む(HTML軽量化)

使用例

# Goファイルのみ、最新100コミット
git-candlestick . -p "*.go" -n 100 -o chart.html --cdn
# 2024年のコミットのみ
git-candlestick . --since 2024-01-01 --until 2024-12-31
# 特定ブランチ
git-candlestick . -b develop
# 公開用HTML(CDN + メッセージ非表示)
git-candlestick . -o public/chart.html --cdn --hide-message

Webページへの埋め込み

<iframesrc="/chart.html"
width="100%"
height="600"
frameborder="0"></iframe>

出力サイズ

オプションHTMLサイズ
デフォルト~3MB (plotly.js埋め込み)
--cdn~10KB (CDNから読み込み)

--cdn を使用する場合、閲覧時にインターネット接続が必要です。

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages