Content Repos Get a Changelog That Fits Them
757 changed files turned out to be 23 real edits. A new script reports what a content repo actually gained instead.
Why Care?
Our content repo works like an external company brain, but we were logging it like code. Lists of changed files and line counts hide what happened: one paragraph is one line, and a folder move touches every page that links into it. In the batch that prompted this, git reported 757 changed files. Only 23 of those were real edits to existing pages.
What's New?
content-stats.pyreports new articles and records, real revisions, moves, resolving wikilinks, citations and links out. It's read-only and uses only the Python standard library.tags_aggregatedcounts tags on published pages that are new or revised, ready for a tag cloud.A generated link list puts every new published page in the entry body as a wikilink, where the site renders it as a real anchor.
Author checks flag new pages nothing links to, and new pages that share a URL with another page.
--privateprints counts only, for repos whose folder names identify clients.
What We Learned
Testing against real content corrected us twice. A regex for wikilinks found 1,640 new ones, which looked impossible until we saw that about half sat in two machine-generated event pages. Then the unresolved count dropped from about 900 to 135 once the script understood that a wikilink inside a markdown table is written [[path\|Name]].
The conventions are in references/content-repos.md.