Commit graph

4 commits

Author SHA1 Message Date
wangzhuc
77e76077d8 fix(learn-theme): HTTP error handling, DRY title extraction, text_light fix
- fetch_article: catch RequestException, add raise_for_status()
- Extract _attach_title() shared by fetch_article and _load_from_file
- text_light: only search foreground colors, not background values

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:37:47 +08:00
wangzhuc
95ba69fd5a feat: learn_theme — add analyze_styles, DEFAULTS, most_common_value, derive_darkmode integration
Excludes dominant text color from accent candidates; blockquote-first
quote_bg heuristic avoids picking up decorative divider colors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 12:37:47 +08:00
wangzhuc
e457b4463b feat: learn_theme — add HTML fetch/extract layer (fetch_article, extract_styles, parse_inline_style)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 12:37:47 +08:00
wangzhuc
1168768618 feat: add learn_theme.py — color utilities (rgb_to_hex, lightness, is_gray, adjust_lightness, derive_darkmode)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 12:37:47 +08:00