Generates the HTML report at https://www.critchley.biz/JobAnalysis, run every 5 minutes during working hours by cron. Reads from ~/.jobserve.gdbm and ~/.jobserve_applications.gdbm, produces a single HTML page with three sections, and deploys via WebDAV.
1. Scored Jobs — main table of AI-scored opportunities, sorted by score then date. Only jobs with score >= min_score (default 5) are shown.2. Job Applications — table of application confirmations, read from the separate applications database ~/.jobserve_applications.gdbm. Newest last.3. Unclassified Emails — debug table showing emails that didn't match any classification. Newest last.
Each row's background colour reflects the score:10 = #d1c4e9 (lilac/purple)9 = #b3e5fc (light blue)8 = #c8e6c9 (light green)7 = #fff9c4 (light yellow)6 = #ffecb3 (light orange)5 = #ffcdd2 (light red)Below 5 = not shown (filtered out)
Clicking a score cell opens a floating overlay showing the AI's reasoning. Pure CSS positioning with minimal JS for show/hide — no framework needed. The overlay is a fixed-position div that appears when the URL hash targets the job row. Mobile-responsive with media queries for small screens.
1. Upload HTML to staging/JobAnalysis/jobanalysis-YYYYMMDD_HHMMSS.html on webdav.critchley.biz2. GET https://www.critchley.biz/deploy/JobAnalysis/jobanalysis-YYYYMMDD_HHMMSS.html — this is a WSGI script on the server that copies from staging to production3. Cleanup: keep only the 5 most recent reports in staging/, delete older onesKnown limitation: no mechanism to delete a file from production once it has been deployed. The staging cleanup only cleans staging.
process_job_analysis() also performs record expiry before generating the report:• Scored jobs older than 14 days → deleted from DB, UID returned for email deletion• Applications older than 28 days → deleted from applications DB• Unclassified emails → never auto-deleted
python3 job_analysis_report.py --db-path PATH (default ~/.jobserve.gdbm) --days N (default 7) --min-score N (default 5) --no-deploy (save HTML locally as job_analysis_report_debug.html instead of uploading)