File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ name : calc-blog-output
3+ description : ブログ投稿統計グラフを生成し、output ディレクトリに出力します
4+ ---
5+
6+ # Calc Blog Output
7+
8+ ブログの投稿統計を集計し、年別の月間投稿数グラフをPNG形式で出力します。
9+
10+ ## 実行手順
11+
12+ ### 1. ブログディレクトリの確認
13+
14+ ``` bash
15+ ls blog/
16+ ```
17+
18+ 存在する年ディレクトリを確認します(例: 2023, 2026)。
19+
20+ ### 2. 出力ディレクトリの作成
21+
22+ ``` bash
23+ mkdir -p output
24+ ```
25+
26+ ### 3. コンテナのビルド
27+
28+ ``` bash
29+ podman build -t blog-analytics tools/blog-analytics/
30+ ```
31+
32+ ### 4. 統計グラフの生成
33+
34+ 存在する各年について、月別統計グラフを生成します:
35+
36+ ``` bash
37+ podman run --rm \
38+ -v ./blog:/data/blog:ro \
39+ -v ./output:/data/output \
40+ blog-analytics --year < YYYY> --output /data/output/< YYYY> -monthly.png
41+ ```
42+
43+ 例:
44+ - 2023年: ` --year 2023 --output /data/output/2023-monthly.png `
45+ - 2026年: ` --year 2026 --output /data/output/2026-monthly.png `
46+
47+ ### 5. 結果の確認
48+
49+ ``` bash
50+ ls -la output/
51+ ```
52+
53+ 生成されたグラフファイルを確認し、ユーザーに報告します。
54+
55+ ## オプション: 月間日別グラフ
56+
57+ 特定の月の日別グラフを生成する場合:
58+
59+ ``` bash
60+ podman run --rm \
61+ -v ./blog:/data/blog:ro \
62+ -v ./output:/data/output \
63+ blog-analytics --year < YYYY> --month < MM> --output /data/output/< YYYY> -< MM> -daily.png
64+ ```
65+
66+ ## 注意事項
67+
68+ - ` output/ ` ディレクトリは ` .gitignore ` に含まれています
69+ - コンテナ実行には Podman が必要です
70+ - 生成されたグラフはユーザーに表示して確認してもらいます
Original file line number Diff line number Diff line change 1+ ---
2+ name : clean-branch
3+ description : mainブランチに切り替え、マージ済みのローカルブランチを削除します
4+ ---
5+
6+ # Clean Branch
7+
8+ ブログ記事追加後に残った不要なブランチを整理します。
9+
10+ ## 実行手順
11+
12+ 以下のコマンドを順番に実行します:
13+
14+ ``` bash
15+ git switch main && git pull && git fetch -p && gh poi
16+ ```
17+
18+ ### 各コマンドの説明
19+
20+ 1 . ` git switch main ` - mainブランチに切り替え
21+ 2 . ` git pull ` - リモートの最新を取得
22+ 3 . ` git fetch -p ` - リモートで削除されたブランチ参照をローカルから削除(prune)
23+ 4 . ` gh poi ` - マージ済みのローカルブランチを削除
24+
25+ ## 注意事項
26+
27+ - 現在のブランチに未コミットの変更がある場合、` git switch main ` が失敗します
28+ - ` gh poi ` は GitHub CLI の拡張機能です(インストール済みの前提)
29+ - 削除されるブランチの一覧が表示されるので確認してください
Original file line number Diff line number Diff line change @@ -67,6 +67,24 @@ GitHub issueに記載されたブログ記事リクエストを処理し、記
6767- 各issueごとに別々のブランチとPRを作成
6868- 特定のissue番号を指定した場合はそのissueのみ処理
6969
70+ ### calc-blog-output
71+
72+ ブログ投稿統計グラフを生成し、output ディレクトリに出力する。
73+
74+ ** 使い方** : ` /calc-blog-output ` を実行
75+ - blogディレクトリ内の年別ディレクトリを検出
76+ - 各年の月別投稿数グラフをPNG形式で生成
77+ - 生成されたグラフは ` output/ ` ディレクトリに保存
78+
79+ ### clean-branch
80+
81+ mainブランチに切り替え、マージ済みのローカルブランチを削除する。
82+
83+ ** 使い方** : ` /clean-branch ` を実行
84+ - mainブランチに切り替えて最新を取得
85+ - リモートで削除されたブランチ参照を整理
86+ - ` gh poi ` でマージ済みブランチを削除
87+
7088## ツール
7189
7290### ブログ投稿統計グラフ生成ツール
You can’t perform that action at this time.
0 commit comments