git-analytics-cli 0.1.4__tar.gz → 0.1.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-analytics-cli
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Local-first Git habit analytics — scan your repos, get a developer persona and health report
5
5
  Author: Git Analytics Contributors
6
6
  License-Expression: MIT
@@ -27,6 +27,8 @@ Dynamic: license-file
27
27
 
28
28
  # Git Analytics
29
29
 
30
+ [![CI](https://github.com/mark-618/git-analytics/actions/workflows/ci.yml/badge.svg)](https://github.com/mark-618/git-analytics/actions/workflows/ci.yml)
31
+
30
32
  **扫描本地 Git 仓库,生成你的开发者人格画像和代码习惯体检报告。**
31
33
 
32
34
  不只统计 commits 和 lines——它告诉你:你是什么类型的开发者,你的代码习惯健康吗。
@@ -37,6 +39,8 @@ Dynamic: license-file
37
39
  pip install git-analytics-cli
38
40
  ```
39
41
 
42
+ > **Package name vs command name**: PyPI package name is `git-analytics-cli`, CLI command is `git-analytics`.
43
+
40
44
  ## 30 秒快速开始
41
45
 
42
46
  ```bash
@@ -49,6 +53,18 @@ git-analytics ~/Projects
49
53
 
50
54
  向导会引导你选择扫描目录、扫描深度、输出目录等,不需要记任何参数。
51
55
 
56
+ ## Interactive Wizard
57
+
58
+ 运行 `git-analytics` 不带参数时,会启动交互式向导:
59
+
60
+ 1. 选择扫描目录(当前目录、Desktop、Projects 等)
61
+ 2. 选择扫描深度(3 或 5)
62
+ 3. 输入输出目录
63
+ 4. 是否自动打开报告
64
+ 5. 是否生成分享卡片设计器
65
+
66
+ 向导会显示配置摘要,确认后开始扫描。输入 `q` 可随时退出。
67
+
52
68
  ## CLI 用法
53
69
 
54
70
  ```bash
@@ -1,5 +1,7 @@
1
1
  # Git Analytics
2
2
 
3
+ [![CI](https://github.com/mark-618/git-analytics/actions/workflows/ci.yml/badge.svg)](https://github.com/mark-618/git-analytics/actions/workflows/ci.yml)
4
+
3
5
  **扫描本地 Git 仓库,生成你的开发者人格画像和代码习惯体检报告。**
4
6
 
5
7
  不只统计 commits 和 lines——它告诉你:你是什么类型的开发者,你的代码习惯健康吗。
@@ -10,6 +12,8 @@
10
12
  pip install git-analytics-cli
11
13
  ```
12
14
 
15
+ > **Package name vs command name**: PyPI package name is `git-analytics-cli`, CLI command is `git-analytics`.
16
+
13
17
  ## 30 秒快速开始
14
18
 
15
19
  ```bash
@@ -22,6 +26,18 @@ git-analytics ~/Projects
22
26
 
23
27
  向导会引导你选择扫描目录、扫描深度、输出目录等,不需要记任何参数。
24
28
 
29
+ ## Interactive Wizard
30
+
31
+ 运行 `git-analytics` 不带参数时,会启动交互式向导:
32
+
33
+ 1. 选择扫描目录(当前目录、Desktop、Projects 等)
34
+ 2. 选择扫描深度(3 或 5)
35
+ 3. 输入输出目录
36
+ 4. 是否自动打开报告
37
+ 5. 是否生成分享卡片设计器
38
+
39
+ 向导会显示配置摘要,确认后开始扫描。输入 `q` 可随时退出。
40
+
25
41
  ## CLI 用法
26
42
 
27
43
  ```bash
@@ -13,8 +13,8 @@ from datetime import datetime
13
13
  try:
14
14
  from PIL import Image, ImageDraw, ImageFont
15
15
  except ImportError:
16
- print("需要安装 Pillow 才能生成 PNG 分享卡片。")
17
- print("运行: pip install git-analytics-cli[share-card]")
16
+ print("Pillow git-analytics-cli 的必需依赖,请重新安装:")
17
+ print("pip install --upgrade git-analytics-cli")
18
18
  sys.exit(1)
19
19
 
20
20
 
@@ -304,8 +304,8 @@ def generate_report(data):
304
304
 
305
305
  # Habit Score
306
306
  score_dims = [
307
- ('提交粒度', habit_score['granularity'], 30),
308
- ('测试意识', habit_score['test_awareness'], 20),
307
+ ('提交粒度', habit_score['granularity'], 40),
308
+ ('测试意识', habit_score['test_awareness'], 10),
309
309
  ('文档意识', habit_score['doc_awareness'], 15),
310
310
  ('作息规律', habit_score['schedule'], 20),
311
311
  ('项目聚焦', habit_score['focus'], 15),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-analytics-cli
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Local-first Git habit analytics — scan your repos, get a developer persona and health report
5
5
  Author: Git Analytics Contributors
6
6
  License-Expression: MIT
@@ -27,6 +27,8 @@ Dynamic: license-file
27
27
 
28
28
  # Git Analytics
29
29
 
30
+ [![CI](https://github.com/mark-618/git-analytics/actions/workflows/ci.yml/badge.svg)](https://github.com/mark-618/git-analytics/actions/workflows/ci.yml)
31
+
30
32
  **扫描本地 Git 仓库,生成你的开发者人格画像和代码习惯体检报告。**
31
33
 
32
34
  不只统计 commits 和 lines——它告诉你:你是什么类型的开发者,你的代码习惯健康吗。
@@ -37,6 +39,8 @@ Dynamic: license-file
37
39
  pip install git-analytics-cli
38
40
  ```
39
41
 
42
+ > **Package name vs command name**: PyPI package name is `git-analytics-cli`, CLI command is `git-analytics`.
43
+
40
44
  ## 30 秒快速开始
41
45
 
42
46
  ```bash
@@ -49,6 +53,18 @@ git-analytics ~/Projects
49
53
 
50
54
  向导会引导你选择扫描目录、扫描深度、输出目录等,不需要记任何参数。
51
55
 
56
+ ## Interactive Wizard
57
+
58
+ 运行 `git-analytics` 不带参数时,会启动交互式向导:
59
+
60
+ 1. 选择扫描目录(当前目录、Desktop、Projects 等)
61
+ 2. 选择扫描深度(3 或 5)
62
+ 3. 输入输出目录
63
+ 4. 是否自动打开报告
64
+ 5. 是否生成分享卡片设计器
65
+
66
+ 向导会显示配置摘要,确认后开始扫描。输入 `q` 可随时退出。
67
+
52
68
  ## CLI 用法
53
69
 
54
70
  ```bash
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "git-analytics-cli"
7
- version = "0.1.4"
7
+ version = "0.1.6"
8
8
  description = "Local-first Git habit analytics — scan your repos, get a developer persona and health report"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -66,10 +66,6 @@ def _confirm(title, default=True):
66
66
  return raw in {"y", "yes", "1", "true"}
67
67
 
68
68
 
69
- def _path_label(path):
70
- return os.path.abspath(os.path.expanduser(path))
71
-
72
-
73
69
  def _existing_path(path):
74
70
  expanded = os.path.abspath(os.path.expanduser(path))
75
71
  return expanded if os.path.isdir(expanded) else None
@@ -140,6 +136,26 @@ def _run_wizard(args):
140
136
  args.output_dir = output_dir
141
137
  args.open = _confirm("生成后自动打开报告?", default=True)
142
138
  args.share_card = _confirm("同时生成分享卡片设计器?", default=True)
139
+
140
+ # 显示配置摘要并确认
141
+ print()
142
+ print("=" * 40)
143
+ print("📋 配置摘要")
144
+ print("=" * 40)
145
+ print("扫描目录:")
146
+ for item in scan_dirs:
147
+ print(f" - {os.path.abspath(os.path.expanduser(item))}")
148
+ print(f"扫描深度: {max_depth}")
149
+ print(f"输出目录: {os.path.abspath(os.path.expanduser(output_dir))}")
150
+ print(f"自动打开报告: {'是' if args.open else '否'}")
151
+ print(f"生成分享卡片: {'是' if args.share_card else '否'}")
152
+ print("=" * 40)
153
+
154
+ confirm = input("[Enter] 开始,输入 q 退出: ").strip().lower()
155
+ if confirm in {"q", "quit", "exit"}:
156
+ print("已退出。")
157
+ sys.exit(0)
158
+
143
159
  print()
144
160
  return args
145
161