AI Newsletter Digest improvements: fixed QP soft line break decoding, URL extraction, and content cleaning

This commit is contained in:
Krilly
2026-03-04 13:29:22 +00:00
parent 29a98137a7
commit 57dd294675
13706 changed files with 2114953 additions and 237629 deletions

View File

@@ -0,0 +1,396 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<title>OpenClaw Daily Digest</title>
<style>
/* Reset for email clients */
body, table, td, a { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
table, td { mso-table-lspace: 0pt; mso-table-rspace: 0pt; }
img { -ms-interpolation-mode: bicubic; border: 0; outline: none; text-decoration: none; }
/* Dark theme base */
body {
margin: 0;
padding: 0;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.6;
color: #e4e4e4;
}
/* Container */
.email-wrapper {
width: 100%;
max-width: 680px;
margin: 0 auto;
background: #0f0f1a;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
/* Header - Gradient with crab */
.header {
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #ff9f43 100%);
padding: 48px 32px;
text-align: center;
position: relative;
}
.header-icon {
font-size: 56px;
margin-bottom: 12px;
display: inline-block;
}
.header h1 {
margin: 0 0 8px 0;
color: #ffffff;
font-size: 32px;
font-weight: 800;
letter-spacing: -0.5px;
}
.header-subtitle {
color: rgba(255,255,255,0.9);
font-size: 15px;
margin: 0;
}
.header-date {
display: inline-block;
background: rgba(255,255,255,0.2);
backdrop-filter: blur(10px);
padding: 10px 24px;
border-radius: 30px;
margin-top: 20px;
font-size: 14px;
font-weight: 600;
color: #fff;
border: 1px solid rgba(255,255,255,0.3);
}
/* Stats bar */
.stats-bar {
display: flex;
justify-content: center;
gap: 48px;
padding: 28px 32px;
background: #1a1a2e;
border-bottom: 1px solid #2a2a3e;
}
.stat {
text-align: center;
}
.stat-number {
font-size: 32px;
font-weight: 800;
background: linear-gradient(135deg, #ff6b6b, #ff9f43);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
line-height: 1;
}
.stat-label {
font-size: 12px;
color: #888;
text-transform: uppercase;
letter-spacing: 1px;
margin-top: 6px;
}
/* Section headers */
.section {
padding: 0 32px;
margin-bottom: 40px;
}
.section-header {
display: flex;
align-items: center;
gap: 12px;
margin: 40px 0 24px 0;
padding-bottom: 12px;
border-bottom: 2px solid #2a2a3e;
}
.section-icon {
width: 40px;
height: 40px;
border-radius: 12px;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 20px;
}
.reddit-icon { background: linear-gradient(135deg, #ff4500, #ff6347); }
.hackernews-icon { background: linear-gradient(135deg, #ff6600, #ff8533); }
.twitter-icon { background: linear-gradient(135deg, #1da1f2, #0d8bd9); }
.section-title {
font-size: 20px;
font-weight: 700;
color: #fff;
margin: 0;
}
/* Story cards - injected by aggregate.py */
.story {
background: linear-gradient(145deg, #1a1a2e 0%, #151525 100%);
border-radius: 12px;
padding: 24px;
margin-bottom: 16px;
border: 1px solid #2a2a3e;
}
.story:last-child {
margin-bottom: 0;
}
/* Source tag */
.source-tag {
display: inline-block;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
padding: 6px 12px;
border-radius: 6px;
margin-bottom: 14px;
}
.tag-reddit { background: rgba(255, 69, 0, 0.15); color: #ff6b6b; }
.tag-hn { background: rgba(255, 102, 0, 0.15); color: #ff9f43; }
.tag-github { background: rgba(139, 148, 158, 0.15); color: #a29bfe; }
.tag-news { background: rgba(116, 185, 255, 0.15); color: #74b9ff; }
/* Story title */
.story-title {
margin: 0 0 12px 0;
font-size: 17px;
font-weight: 600;
line-height: 1.5;
color: #fff;
}
.story-title a {
color: #74b9ff;
text-decoration: none;
transition: color 0.2s;
}
.story-title a:hover {
color: #ff6b6b;
text-decoration: underline;
}
/* Story meta */
.story-meta {
font-size: 14px;
color: #888;
margin-bottom: 12px;
}
.author {
color: #a29bfe;
font-weight: 500;
}
/* Story excerpt */
.story-excerpt {
font-size: 14px;
line-height: 1.6;
color: #aaa;
margin: 0 0 14px 0;
}
/* Engagement badges */
.engagement {
font-size: 13px;
}
.badge {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
margin-right: 8px;
}
.badge-upvotes {
background: rgba(255, 107, 107, 0.15);
color: #ff6b6b;
}
.badge-comments {
background: rgba(116, 185, 255, 0.15);
color: #74b9ff;
}
/* Empty state */
.empty-state {
text-align: center;
padding: 40px 32px;
color: #666;
font-size: 15px;
}
/* Divider */
.divider {
height: 1px;
background: #2a2a3e;
margin: 0 32px;
}
/* Coming soon banner */
.coming-soon {
background: linear-gradient(135deg, #2d3436 0%, #1a1a2e 100%);
border: 2px dashed #444;
border-radius: 12px;
padding: 40px;
text-align: center;
color: #888;
font-size: 15px;
}
.coming-soon-icon {
font-size: 36px;
margin-bottom: 12px;
}
/* Footer */
.footer {
background: #0a0a12;
padding: 40px 32px;
text-align: center;
margin-top: 48px;
border-top: 1px solid #2a2a3e;
}
.footer-avatar {
width: 64px;
height: 64px;
background: linear-gradient(135deg, #ff6b6b, #ff9f43);
border-radius: 50%;
margin: 0 auto 16px;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
}
.footer-brand {
font-size: 18px;
font-weight: 700;
color: #fff;
margin-bottom: 6px;
}
.footer-text {
font-size: 14px;
color: #888;
margin: 0 0 20px 0;
}
.footer-links {
margin-top: 20px;
}
.footer-links a {
color: #74b9ff;
text-decoration: none;
font-size: 14px;
margin: 0 12px;
}
.footer-links a:hover {
color: #ff6b6b;
text-decoration: underline;
}
.footer-time {
font-size: 12px;
color: #555;
margin-top: 20px;
}
/* Mobile */
@media screen and (max-width: 640px) {
.header { padding: 36px 24px; }
.header h1 { font-size: 26px; }
.header-icon { font-size: 44px; }
.stats-bar { gap: 32px; padding: 24px; }
.stat-number { font-size: 28px; }
.section { padding: 0 24px; margin-bottom: 32px; }
.section-header { margin-top: 32px; }
.story { padding: 20px; }
.story-title { font-size: 16px; }
.footer { padding: 32px 24px; }
}
</style>
</head>
<body>
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td align="center" style="padding: 20px 10px;">
<div class="email-wrapper">
<!-- Header -->
<div class="header">
<div class="header-icon">🦀</div>
<h1>OpenClaw Daily</h1>
<p class="header-subtitle">The best OpenClaw discussions, curated daily</p>
<div class="header-date">{{DATE}}</div>
</div>
<!-- Stats -->
<div class="stats-bar">
<div class="stat">
<div class="stat-number">{{REDDIT_COUNT}}</div>
<div class="stat-label">Reddit</div>
</div>
<div class="stat">
<div class="stat-number">{{NEWS_COUNT}}</div>
<div class="stat-label">News</div>
</div>
<div class="stat">
<div class="stat-number">{{TWITTER_COUNT}}</div>
<div class="stat-label">X/Twitter</div>
</div>
</div>
<!-- Reddit Section -->
<div class="section">
<div class="section-header">
<span class="section-icon reddit-icon">🔥</span>
<h2 class="section-title">Reddit Highlights</h2>
</div>
{{REDDIT_STORIES}}
</div>
<div class="divider"></div>
<!-- News Section -->
<div class="section">
<div class="section-header">
<span class="section-icon hackernews-icon">🟧</span>
<h2 class="section-title">News & Hacker News</h2>
</div>
{{NEWS_STORIES}}
</div>
<div class="divider"></div>
<!-- X Section -->
<div class="section">
<div class="section-header">
<span class="section-icon twitter-icon">𝕏</span>
<h2 class="section-title">From X</h2>
</div>
{{TWITTER_STORIES}}
</div>
<!-- Footer -->
<div class="footer">
<div class="footer-avatar">🦀</div>
<div class="footer-brand">Curated daily for Anthony Martin</div>
<p class="footer-text">by Krilly the Crab</p>
<div class="footer-links">
<a href="https://github.com/openclaw/openclaw">GitHub</a>
<a href="https://reddit.com/r/openclaw">Reddit</a>
<a href="https://docs.openclaw.ai">Docs</a>
</div>
<p class="footer-time">{{GENERATED_AT}} UTC</p>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>