调整总结格式
This commit is contained in:
@@ -19,57 +19,61 @@ def md_str_to_html(md_content, output_html):
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
|
||||
padding: 25px 30px;
|
||||
line-height: 1.7;
|
||||
max-width: 700px;
|
||||
padding: 20px 25px;
|
||||
line-height: 1.6;
|
||||
max-width: 750px;
|
||||
margin: 0 auto;
|
||||
background-color: #f9f9f9;
|
||||
color: #333;
|
||||
border: 1px solid #f0f0f0;
|
||||
font-size: 16px;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #222;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 15px;
|
||||
margin-top: 24px;
|
||||
margin-bottom: 16px;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
line-height: 1.3;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.8em;
|
||||
padding-bottom: 10px;
|
||||
font-size: 2.2em;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid #eee;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 25px;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
padding-bottom: 8px;
|
||||
margin-top: 25px;
|
||||
font-size: 1.8em;
|
||||
padding-bottom: 10px;
|
||||
margin-top: 30px;
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #2c3e50;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.3em;
|
||||
margin-top: 20px;
|
||||
padding-left: 10px;
|
||||
border-left: 3px solid #ddd;
|
||||
font-size: 1.5em;
|
||||
margin-top: 25px;
|
||||
padding-left: 12px;
|
||||
border-left: 4px solid #ddd;
|
||||
color: #34495e;
|
||||
}
|
||||
pre, code {
|
||||
background-color: #f5f5f5;
|
||||
padding: 10px;
|
||||
border-radius: 3px;
|
||||
padding: 12px;
|
||||
border-radius: 4px;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 0.9em;
|
||||
font-size: 0.95em;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: 15px 0;
|
||||
margin: 18px 0;
|
||||
background-color: white;
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid #eee;
|
||||
padding: 8px 10px;
|
||||
padding: 10px 12px;
|
||||
text-align: left;
|
||||
}
|
||||
th {
|
||||
@@ -79,57 +83,62 @@ def md_str_to_html(md_content, output_html):
|
||||
/* 确保 Emoji 正确渲染 */
|
||||
span, p, li {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
|
||||
font-size: 16px;
|
||||
}
|
||||
p {
|
||||
margin: 12px 0;
|
||||
margin: 16px 0;
|
||||
color: #333;
|
||||
line-height: 1.8;
|
||||
font-size: 16px;
|
||||
}
|
||||
ul, ol {
|
||||
padding-left: 22px;
|
||||
margin: 15px 0;
|
||||
padding-left: 25px;
|
||||
margin: 18px 0;
|
||||
}
|
||||
li {
|
||||
margin: 5px 0;
|
||||
margin: 8px 0;
|
||||
line-height: 1.7;
|
||||
font-size: 16px;
|
||||
}
|
||||
blockquote {
|
||||
margin: 15px 0;
|
||||
padding: 10px 15px;
|
||||
margin: 18px 0;
|
||||
padding: 12px 18px;
|
||||
background-color: #f8f8f8;
|
||||
border-left: 4px solid #ddd;
|
||||
color: #666;
|
||||
font-size: 0.95em;
|
||||
border-left: 5px solid #ddd;
|
||||
color: #555;
|
||||
font-size: 1em;
|
||||
}
|
||||
/* 强调样式 */
|
||||
strong {
|
||||
color: #333;
|
||||
color: #222;
|
||||
font-weight: 600;
|
||||
}
|
||||
/* 链接样式 */
|
||||
a {
|
||||
color: #576b95;
|
||||
color: #3498db;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
color: #2980b9;
|
||||
}
|
||||
/* 星级评分样式 */
|
||||
h3 em {
|
||||
color: #fa8c16;
|
||||
font-style: normal;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
/* 时间和标签样式 */
|
||||
.time, .tag {
|
||||
color: #888;
|
||||
font-size: 0.9em;
|
||||
color: #777;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
/* 底部署名样式 */
|
||||
.signature {
|
||||
margin-top: 30px;
|
||||
margin-top: 35px;
|
||||
text-align: right;
|
||||
color: #888;
|
||||
font-size: 0.9em;
|
||||
color: #777;
|
||||
font-size: 0.95em;
|
||||
font-style: italic;
|
||||
}
|
||||
</style>
|
||||
@@ -182,8 +191,11 @@ def html_to_image(html_file, output_image):
|
||||
# 加载本地的 HTML 文件
|
||||
page.goto(f'file://{os.path.abspath(html_file)}')
|
||||
|
||||
# 设置 viewport(可选,根据需要调整)
|
||||
page.set_viewport_size({"width": 750, "height": 700})
|
||||
# 设置 viewport(调整为更合适的宽度)
|
||||
page.set_viewport_size({"width": 750, "height": 800})
|
||||
|
||||
# 等待内容完全渲染
|
||||
page.wait_for_timeout(500)
|
||||
|
||||
# 截图
|
||||
page.screenshot(path=output_image, full_page=True)
|
||||
@@ -217,59 +229,50 @@ def convert_md_str_to_image(md_content, output_image):
|
||||
if __name__ == "__main__":
|
||||
# 示例 Markdown 字符串(包含中文和 Emoji)
|
||||
md_content = """
|
||||
# 🌟「极浪先锋体验官群 - 2023年3月24日 总结」🌟
|
||||
# 🌟「4KED康复训练群 - 2023年3月26日 总结」🌟
|
||||
|
||||
## 📊 今日数据快报
|
||||
- **总消息数**:📩 200 条
|
||||
- **最活跃时段**:🔥 09:00 - 10:00 (📈 30 条/小时)
|
||||
- **聊天时段**:🕒 06:52 - 15:29
|
||||
- **总消息数**:📩 165 条
|
||||
- **最活跃时段**:🔥 11:00 - 12:00 (📈 25 条/小时)
|
||||
- **聊天时段**:🕒 09:41 - 16:40
|
||||
|
||||
## 🌌 话题总结
|
||||
|
||||
### 1️⃣ 【汽车与驾驶经验分享】 ⭐⭐⭐⭐⭐
|
||||
🕒 **聊天时段**:09:00 - 09:30 (👥 6 人参与)
|
||||
### 1️⃣ 【开源OA项目讨论】 ⭐⭐⭐⭐⭐
|
||||
🕒 **聊天时段**:09:42 - 09:54 (👥 5 人参与)
|
||||
🔍 **话题回顾**:
|
||||
讨论围绕 **汽车驾驶技巧**及**车主经验**展开,参与者分享了各自驾驶中的趣事与技巧。
|
||||
- [郑晓杰] 提到 **“空挡溜车”**的经历,引发众人对安全驾驶的讨论。
|
||||
- [BlackBear] 讲述了被大哥质问的搞笑瞬间,增加了话题热度。
|
||||
> **金句回顾**:"破财免灾,大吉大利。" —— [@BlackBear]
|
||||
本次讨论围绕 **开源OA项目** 展开,大家探讨目前市场上有哪些可选的项目。啧啧,用户们的热情高涨,啊菜提出想要了解免费OA项目的需求,水牛和刘政则分享了过往的经验,认为如今的开源项目越来越少,比起大厂的项目,很多选择都不够灵活。通过这样的讨论,群友们互相支招,真是一场“技术头脑风暴”!
|
||||
> **金句回顾**:"真是心血来潮,搞OA不是小事!" —— [@啊菜]
|
||||
📌 **额外信息**:讨论中提及了 **开源OA项目的网站链接**,有兴趣的可以去看看!
|
||||
|
||||
### 2️⃣ 【群内轻松话题】 ⭐⭐⭐⭐
|
||||
🕒 **聊天时段**:09:45 - 10:15 (👥 8 人参与)
|
||||
### 2️⃣ 【智能医疗AI的落地方向】 ⭐⭐⭐⭐
|
||||
🕒 **聊天时段**:10:29 - 10:39 (👥 7 人参与)
|
||||
🔍 **高能讨论**:
|
||||
群友们开始轻松调侃,涉及 **食物与地方特产**,特别是关于[普宁豆酱]和[绿豆饼]的分享。
|
||||
- [Jiojio] 提到自己带的特产,唤起了大家的食欲。
|
||||
- [寸头男孩] 要求带些地方小吃,气氛轻松愉快。
|
||||
📌 **实用干货**:推荐了 **地方特产和美食**,引发食物讨论的热潮。
|
||||
在这一话题中,用户们讨论了 **医疗行业中AI大模型落地的方向**。纯洁善良互助有爱提出了医疗知识库和对话式AI的想法,引发了其他用户的热烈回响,纷纷分享了智能问诊、病例解析等方向。大家的参与热情可见一斑,兴致勃勃讨论未来的医学科技趋势!
|
||||
> **精华总结**:"基层干事的人最懂需求!" —— [@纯洁善良互助有爱]
|
||||
|
||||
### 3️⃣ 【生活琐事与幽默分享】 ⭐⭐⭐⭐
|
||||
🕒 **聊天时段**:10:20 - 11:00 (👥 7 人参与)
|
||||
### 3️⃣ 【趣谈工作与生活】 ⭐⭐⭐
|
||||
🕒 **聊天时段**:10:00 - 11:00 (👥 8 人参与)
|
||||
🔍 **讨论亮点**:
|
||||
大家分享生活中的小趣事和笑话,增加了群内的亲密感。
|
||||
- [别吃,很胖了] 提到自己的幽默日常,且引发众人的共鸣。
|
||||
- [郑晓杰] 也分享了自己的搞笑经历,让大家捧腹大笑。
|
||||
> **精华总结**:"我只知道一个轻推的习惯。" —— [@郑晓杰]
|
||||
在轻松愉快的氛围中,用户们围绕工作和生活进行了有趣的讨论,尤其是关于“带薪休假”的轻松话题,大家分享了自己的工作经验和休闲方式。水牛和刘政重返了一个“带薪拉屎”的幽默梗,令群聊气氛瞬间活跃,友好的互动让人忍俊不禁!
|
||||
|
||||
### 4️⃣ 【求姻缘与生活感悟】 ⭐⭐⭐
|
||||
🕒 **聊天时段**:12:30 - 13:00 (👥 5 人参与)
|
||||
### 4️⃣ 【电子产品的讨论】 ⭐⭐⭐
|
||||
🕒 **聊天时段**:12:00 - 14:00 (👥 6 人参与)
|
||||
🔍 **精彩瞬间**:
|
||||
群友们开始讨论 **求姻缘的经历**,分享了不同的见解与感悟。
|
||||
- [别吃,很胖了] 替朋友祈福的经历引起了共鸣,大家讨论了姻缘与生活的连接。
|
||||
- 参与者们分享了自己的求姻缘故事,增加了互动。
|
||||
此话题围绕 **近期电子产品和技术讨论** 展开,参与者们活跃分享各自对电子产品的见解。用户们聊天中不乏对新技术的吐槽与调侃,《特斯拉在美国被砸事件》等话题也层出不穷,是一个技术与笑点并存的轻松话题!
|
||||
> **幽默补充**:"这不是数字经济,就是电子的ED!" —— [@水牛]
|
||||
|
||||
### 5️⃣ 【汽车品牌及车型讨论】 ⭐⭐⭐
|
||||
🕒 **聊天时段**:14:00 - 15:00 (👥 6 人参与)
|
||||
### 5️⃣ 【现实生活和社会现象】 ⭐⭐⭐
|
||||
🕒 **聊天时段**:14:30 - 16:25 (👥 7 人参与)
|
||||
🔍 **讨论小结**:
|
||||
群友们热烈讨论了 **汽车品牌与车型**,特别是极氪与特斯拉的比较。
|
||||
- [Ailian] 表达了对特斯拉的看法,同时引发了对其他品牌的讨论。
|
||||
- [BlackBear] 和其他成员对各自的车型进行了幽默的调侃。
|
||||
用户们在沉着交谈的同时,关注了现实生活中的社会现象。“开车的礼仪”、“不买卖积分”等成为了热门话题,刘政和Y.Shuang的告诫触发了共鸣,引发参与者们对生活中各种现象的探讨与反思,令人深思。
|
||||
|
||||
## 🎖️ 今日荣誉榜
|
||||
🏆 **群聊 MVP**:[@BlackBear]
|
||||
🏆 **群聊 MVP**:[@水牛]
|
||||
👑 **获奖理由**:
|
||||
✅ 发起 3 个热门话题
|
||||
✅ 贡献 5 个幽默段子
|
||||
✅ **创新贡献**:"破财免灾"的智慧分享,让大家倍感轻松。
|
||||
✅ 发起多个热门话题
|
||||
✅ 贡献多种幽默段子
|
||||
✅ **金句输出**:"带薪拉屎,太美了!"
|
||||
|
||||
✨ *本总结由 AI 自动生成,快来看看你今天是不是最靓的崽!🔥*
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user