summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-08 00:06:05 +0300
committerPaul Buetow <paul@buetow.org>2025-07-08 00:06:05 +0300
commit164b9b62a4b04a9a6e80bab445cfc2711490dd00 (patch)
treea6dffa090f4ce0145bdae0107af5b980df1aedc7 /internal
parent352e129ac7e3cb5106de2c6f60d5994ffab1bedb (diff)
feat: add recent activity metric to showcase.gmi.tpl output
- Shows average age of last 42 commits as 'Recent Activity' in days - Helps readers quickly identify actively maintained projects - Displayed between Development Period and License in metadata 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal')
-rw-r--r--internal/showcase/showcase.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/showcase/showcase.go b/internal/showcase/showcase.go
index 7213f0c..f32759e 100644
--- a/internal/showcase/showcase.go
+++ b/internal/showcase/showcase.go
@@ -292,6 +292,7 @@ func (g *Generator) formatGemtext(summaries []ProjectSummary) string {
builder.WriteString(fmt.Sprintf("* Commits: %d\n", summary.Metadata.CommitCount))
builder.WriteString(fmt.Sprintf("* Lines of Code: %d\n", summary.Metadata.LinesOfCode))
builder.WriteString(fmt.Sprintf("* Development Period: %s to %s\n", summary.Metadata.FirstCommitDate, summary.Metadata.LastCommitDate))
+ builder.WriteString(fmt.Sprintf("* Recent Activity: %.1f days (avg. age of last 42 commits)\n", summary.Metadata.AvgCommitAge))
builder.WriteString(fmt.Sprintf("* License: %s\n\n", summary.Metadata.License))
}