Files
llm_wiki/tools/scripts/stats.ps1
T
hehaiguang1123 a6f05ab2d5 Phase 0-2: Schema cleanup, typed relations, event-driven automation
- Phase 0: AGENTS.md cleanup (dedup quotes, renumber sections, merge qmd)
- Phase 1: typed relations (manage-relations.py, graph-search.py, check-staleness.py, detect-conflicts.py)
- Phase 2: frontmatter validator, weekly lint, knowledge promotion, git hooks
- Fix .gitignore to track tools/ and .githooks/
- Fix git remote URL (remove plaintext token)
- New wiki pages: 504 pages, 34 raw sources
2026-07-01 08:05:43 +08:00

36 lines
1.4 KiB
PowerShell

$files = Get-ChildItem -Path '.' -Filter '*.md' -Recurse
$totalLines = 0
$totalChars = 0
foreach ($file in $files) {
$content = Get-Content $file.FullName -Raw -ErrorAction SilentlyContinue
if ($content) {
$lines = ($content -split "`n").Count
$chars = $content.Length
$totalLines += $lines
$totalChars += $chars
}
}
Write-Output "Total files: $($files.Count)"
Write-Output "Total lines: $totalLines"
Write-Output "Total characters: $totalChars"
Write-Output "Avg characters per file: $([math]::Round($totalChars/$files.Count))"
Write-Output "Avg lines per file: $([math]::Round($totalLines/$files.Count))"
# Categorize files
$templates = Get-ChildItem -Path './Templates' -Filter '*.md' -Recurse
$daily = Get-ChildItem -Path './Daily' -Filter '*.md' -Recurse
$notes = Get-ChildItem -Path './Notes' -Filter '*.md' -Recurse
$clippings = Get-ChildItem -Path './Clippings' -Filter '*.md' -Recurse
$references = Get-ChildItem -Path './References' -Filter '*.md' -Recurse
$categories = Get-ChildItem -Path './Categories' -Filter '*.md' -Recurse
Write-Output "`nBreakdown by category:"
Write-Output "Templates: $($templates.Count)"
Write-Output "Daily notes: $($daily.Count)"
Write-Output "Notes: $($notes.Count)"
Write-Output "Clippings: $($clippings.Count)"
Write-Output "References: $($references.Count)"
Write-Output "Categories: $($categories.Count)"