Skip to content

xiumingzhang/webpage-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpage-monitor

A webpage monitor that tracks changes to websites and generates Markdown reports for AI agents to read.

Data I/O

All data lives under DATA_DIR defined in constants.py:

/Users/xiumingz/Library/Mobile Documents/com~apple~CloudDocs/ai/webpage-monitor/
  • DATA_DIR/roster.json — URLs to monitor
  • DATA_DIR/reports/ — Markdown reports (e.g. 2026-03-15_15-48-52.md)
  • DATA_DIR/snapshots/ — latest HTML snapshot per URL (for diffing)

Setup

uv sync

Configure URLs to monitor in DATA_DIR/roster.json:

{
  "https://example.com/": {},
  "https://example.com/page": {
    "ignore_prefix": ["<script>", "<!-- dynamic -->"]
  }
}

Usage

Generate a report (one-shot check)

cd /Users/xiumingz/repos/webpage-monitor
uv run main.py check

This snapshots all URLs in roster.json, diffs against previous snapshots, and saves a Markdown report. The report filename is timestamped, e.g. 2026-03-15_15-48-52.md.

Read the latest report

uv run main.py report

Prints the most recent report to stdout.

For AI agents

  1. Run uv run main.py check from /Users/xiumingz/repos/webpage-monitor/ to generate a new report.
  2. The report is saved as a .md file under DATA_DIR/reports/ (see constants.py). Filename: YYYY-MM-DD_HH-MM-SS.md.
  3. Read the report file directly, or run uv run main.py report to get the latest one on stdout.
  4. Edit DATA_DIR/roster.json to add/remove monitored URLs.

Continuous monitoring

uv run main.py monitor --check-every 43200

Runs in a loop, checks every N seconds, and saves a report on each check.