Skip to content

Commit f840916

Browse files
committed
refactor: generate only zh-CN and en-US project status reports, each for its own stories; clean up obsolete reports
1 parent e2be87d commit f840916

65 files changed

Lines changed: 4914 additions & 196 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.nuke/build.schema.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727
"Build",
2828
"BuildAll",
2929
"Clean",
30+
"CleanPluginsArtifacts",
3031
"Default",
3132
"Pack",
33+
"Plugin",
3234
"Restore",
3335
"Run",
3436
"Test"
@@ -113,6 +115,14 @@
113115
"Release"
114116
]
115117
},
118+
"name": {
119+
"type": "string",
120+
"description": "Name of the plugin to pack (required when op=single)"
121+
},
122+
"op": {
123+
"type": "string",
124+
"description": "Operation to perform: 'all' (default) or 'single'"
125+
},
116126
"Solution": {
117127
"type": "string",
118128
"description": "Path to a solution file that is automatically loaded"

README-Project-Status.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Modulus 项目状态
2+
3+
本文档提供了 Modulus 项目的当前状态和进度概览。
4+
5+
## Story 命名规则
6+
7+
我们采用统一的 Story 命名规则:
8+
9+
- **文件格式**`S-XXXX-标题.md` (例如:`S-0001-初始项目设置.md`)
10+
- **标题格式**`# S-XXXX-标题` (例如:`# S-0001-初始项目设置`)
11+
- **必要元数据**:每个 Story 文档需包含优先级和状态标记
12+
13+
```markdown
14+
<!-- 优先级:P0 | P1 | P2 -->
15+
<!-- 状态:待开始 | 进行中 | 已完成 -->
16+
```
17+
18+
## 如何生成最新进度报告
19+
20+
我们提供了自动化脚本来生成项目进度报告:
21+
22+
```powershell
23+
# 默认生成报告(存放在 docs/reports 目录)
24+
.\Update-ProjectDocs.ps1
25+
26+
# 指定报告输出目录
27+
.\Update-ProjectDocs.ps1 -ReportPath ".\custom\path"
28+
29+
# 同时清理空文件
30+
.\Update-ProjectDocs.ps1 -CleanEmptyFiles
31+
```
32+
33+
这将生成以下报告文件:
34+
- `docs/reports/story-progress-report.md` - 默认进度报告
35+
- `docs/reports/story-progress-report.zh-CN.md` - 中文进度报告
36+
- `docs/reports/story-progress-report.en-US.md` - 英文进度报告
37+
38+
## 项目管理文档
39+
40+
详细的项目管理指南可在以下位置找到:
41+
- [项目管理指南](./docs/project-management.md)
42+
- [Story 模板](./docs/story-template.md)
43+
44+
## 如何更新任务状态
45+
46+
1. 在相应的 Story 文档中,将已完成任务的复选框从 `[ ]` 更新为 `[x]`
47+
2. 更新 Story 文档顶部的状态注释(<!-- 状态:待开始 | 进行中 | 已完成 -->
48+
3. 运行进度报告脚本查看最新状态
49+
50+
## GitHub 项目看板
51+
52+
您也可以在我们的 GitHub 仓库查看可视化的项目进度:
53+
[https://github.com/Agibuild/modulus/projects](https://github.com/Agibuild/modulus/projects)

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,34 @@ Modulus - Modular Application Template for Cross-Platform Tooling
3333

3434
```bash
3535
dotnet new --install Modulus.Templates
36-
dotnet new modulus-plugin -n MyPlugin
36+
dotnet new modulus-plugin -n MyPlugin
37+
```
38+
39+
---
40+
41+
## 📚 文档
42+
43+
完整的项目文档可以在 [docs](./docs/README.md) 目录中找到。文档包括:
44+
45+
- **用户指南**:安装说明、使用说明和故障排除
46+
- **开发者指南**:插件开发、系统架构和 API 参考
47+
- **用户故事**:产品开发路线图和功能演进
48+
49+
文档提供多种语言版本:
50+
- [English Documentation](./docs/en-US/README.md)
51+
- [中文文档](./docs/zh-CN/README.md)
52+
53+
---
54+
55+
## 📊 项目状态
56+
57+
查看当前项目进度与状态请参阅 [README-Project-Status.md](./README-Project-Status.md)
58+
59+
我们使用标准化的用户故事文档,所有 Story 文件遵循以下命名规则:
60+
- 文件格式:`S-XXXX-标题.md`
61+
- 文档标题:`# S-XXXX-标题`
62+
- 必要元数据:包含优先级和状态标记
63+
64+
通过运行 `.\Generate-StoryProgress.ps1` 可生成最新的项目进度报告。
65+
66+
---

Update-ProjectDocs.ps1

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# 项目进度状态生成脚本
2+
# 该脚本扫描 docs 目录下的 story 文档,生成项目进度报告
3+
4+
param (
5+
[string]$ChineseReportPath = ".\docs\reports\story-progress-report.zh-CN.md",
6+
[string]$EnglishReportPath = ".\docs\reports\story-progress-report.en-US.md"
7+
)
8+
9+
function Get-StoryFiles {
10+
param([string]$Lang)
11+
if ($Lang -eq "zh-CN") {
12+
$dir = ".\docs\zh-CN\stories"
13+
} else {
14+
$dir = ".\docs\en-US\stories"
15+
}
16+
$storyFiles = @()
17+
if (Test-Path $dir) {
18+
$storyFiles += Get-ChildItem -Path $dir -Filter "*.md"
19+
}
20+
return $storyFiles
21+
}
22+
23+
function Get-StoryStatus {
24+
param([string]$Content)
25+
$total = ([regex]::Matches($Content, '- \[[ xX]\]')).Count
26+
$done = ([regex]::Matches($Content, '- \[[xX]\]')).Count
27+
return @{ Total = $total; Done = $done }
28+
}
29+
30+
function Get-StoryId {
31+
param([string]$FileName)
32+
$match = [regex]::Match($FileName, 'S-(\d+)-')
33+
if ($match.Success) { return [int]$match.Groups[1].Value }
34+
return 9999
35+
}
36+
37+
function Get-ProjectReport {
38+
param(
39+
[string]$Lang # zh-CN or en-US
40+
)
41+
$storyFiles = Get-StoryFiles -Lang $Lang | Sort-Object { Get-StoryId $_.Name }
42+
$totalTasks = 0
43+
$completedTasks = 0
44+
$storyRows = @()
45+
46+
foreach ($file in $storyFiles) {
47+
$content = Get-Content -Path $file.FullName -Raw
48+
$status = Get-StoryStatus -Content $content
49+
$totalTasks += $status.Total
50+
$completedTasks += $status.Done
51+
$display = if ($status.Total -eq 0) { "N/A" } else { "$($status.Done)/$($status.Total)" }
52+
$storyRows += "| $($file.BaseName) | $display |"
53+
}
54+
55+
$completionRate = if ($totalTasks -gt 0) { [math]::Round($completedTasks * 100.0 / $totalTasks) } else { 0 }
56+
57+
if ($Lang -eq "zh-CN") {
58+
$report = @"
59+
# Modulus 项目进度报告
60+
61+
生成时间: $(Get-Date -Format "yyyy-MM-dd HH:mm:ss")
62+
## 总体进度
63+
64+
- 总任务数: $totalTasks
65+
- 已完成任务: $completedTasks
66+
- 完成率: $completionRate%
67+
68+
## 各 Story 进度
69+
70+
| Story | 完成/总计 |
71+
|-------|-----------|
72+
$($storyRows -join "`n")
73+
"@
74+
} else {
75+
$report = @"
76+
# Modulus Project Progress Report
77+
78+
Generated at: $(Get-Date -Format "yyyy-MM-dd HH:mm:ss")
79+
## Overall Progress
80+
81+
- Total tasks: $totalTasks
82+
- Completed tasks: $completedTasks
83+
- Completion rate: $completionRate%
84+
85+
## Story Progress
86+
87+
| Story | Completed/Total |
88+
|-------|-----------------|
89+
$($storyRows -join "`n")
90+
"@
91+
}
92+
return $report
93+
}
94+
95+
# 清理无用的报告文件(只保留本次生成的两个)
96+
$reportDir = Split-Path $ChineseReportPath -Parent
97+
$allReports = Get-ChildItem -Path $reportDir -Filter "story-progress-report*.md" -ErrorAction SilentlyContinue
98+
foreach ($f in $allReports) {
99+
if ($f.FullName -ne (Resolve-Path $ChineseReportPath) -and $f.FullName -ne (Resolve-Path $EnglishReportPath)) {
100+
Remove-Item $f.FullName -Force
101+
}
102+
}
103+
104+
# 主执行流程
105+
Write-Host "开始生成中英文项目进度报告..." -ForegroundColor Cyan
106+
107+
# 生成中文报告
108+
$zhReport = Get-ProjectReport -Lang "zh-CN"
109+
$zhDir = Split-Path $ChineseReportPath -Parent
110+
if (-not (Test-Path $zhDir)) { New-Item -Path $zhDir -ItemType Directory -Force | Out-Null }
111+
$zhReport | Out-File -FilePath $ChineseReportPath -Encoding UTF8
112+
Write-Host "中文报告已生成: $ChineseReportPath" -ForegroundColor Green
113+
114+
# 生成英文报告
115+
$enReport = Get-ProjectReport -Lang "en-US"
116+
$enDir = Split-Path $EnglishReportPath -Parent
117+
if (-not (Test-Path $enDir)) { New-Item -Path $enDir -ItemType Directory -Force | Out-Null }
118+
$enReport | Out-File -FilePath $EnglishReportPath -Encoding UTF8
119+
Write-Host "English report generated: $EnglishReportPath" -ForegroundColor Green
120+
121+
Write-Host "\n✅ 项目进度报告已更新!" -ForegroundColor Green

0 commit comments

Comments
 (0)