Skip to content

Commit b82c708

Browse files
bakerboy448claude
andcommitted
Add timestamp header to wiki pages
- Added "Last Updated" timestamp at top of each wiki page - Shows current UTC time when wiki content is generated - Improves transparency of when modlog was last refreshed 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d3b28c8 commit b82c708

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

modlog_wiki_publisher.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,8 +862,12 @@ def generate_modmail_link(subreddit: str, action) -> str:
862862

863863
def build_wiki_content(actions: List, config: Dict[str, Any]) -> str:
864864
"""Build wiki page content from actions"""
865+
# Add timestamp header at the top
866+
current_time = datetime.now(timezone.utc)
867+
timestamp_header = f"**Last Updated:** {current_time.strftime('%Y-%m-%d %H:%M:%S UTC')}\n\n---\n\n"
868+
865869
if not actions:
866-
return "No recent moderation actions found."
870+
return timestamp_header + "No recent moderation actions found."
867871

868872
# CRITICAL: Validate all actions belong to the same subreddit before building content
869873
target_subreddit = config.get('source_subreddit', '')
@@ -894,7 +898,7 @@ def build_wiki_content(actions: List, config: Dict[str, Any]) -> str:
894898
actions_by_date[date_str].append(action)
895899

896900
# Build content - include ID column for tracking actions across the table
897-
content_parts = []
901+
content_parts = [timestamp_header]
898902
for date_str in sorted(actions_by_date.keys(), reverse=True):
899903
content_parts.append(f"## {date_str}")
900904
content_parts.append("| Time | Action | ID | Moderator | Content | Reason | Inquire |")

0 commit comments

Comments
 (0)