From a5c3aa2af1ff2a63c378f67a3d09b4650c3e840f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=89=E9=9B=A8?= <55933093+Liangyu-G@users.noreply.github.com> Date: Fri, 3 Apr 2026 13:51:10 +0800 Subject: [PATCH] =?UTF-8?q?ATRI=E9=A3=8E=E6=A0=BC=E6=A8=A1=E6=9D=BF=20(#15?= =?UTF-8?q?4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add files via upload * Create test * Add files via upload * Delete src/infrastructure/reporting/templates/ATRI/test * Add files via upload --- _conf_schema.json | 1 + .../templates/ATRI/activity_chart.html | 53 + .../templates/ATRI/chat_quality_item.html | 155 + .../templates/ATRI/html_template.html | 3070 +++++++++++++++++ .../templates/ATRI/image_template.html | 1897 ++++++++++ .../templates/ATRI/pdf_template.html | 569 +++ .../reporting/templates/ATRI/quote_item.html | 33 + .../reporting/templates/ATRI/topic_item.html | 44 + .../templates/ATRI/user_title_item.html | 39 + 9 files changed, 5861 insertions(+) create mode 100644 src/infrastructure/reporting/templates/ATRI/activity_chart.html create mode 100644 src/infrastructure/reporting/templates/ATRI/chat_quality_item.html create mode 100644 src/infrastructure/reporting/templates/ATRI/html_template.html create mode 100644 src/infrastructure/reporting/templates/ATRI/image_template.html create mode 100644 src/infrastructure/reporting/templates/ATRI/pdf_template.html create mode 100644 src/infrastructure/reporting/templates/ATRI/quote_item.html create mode 100644 src/infrastructure/reporting/templates/ATRI/topic_item.html create mode 100644 src/infrastructure/reporting/templates/ATRI/user_title_item.html diff --git a/_conf_schema.json b/_conf_schema.json index 0a47a11..7d6c418 100644 --- a/_conf_schema.json +++ b/_conf_schema.json @@ -67,6 +67,7 @@ "type": "string", "description": "报告模板", "options": [ + "ATRI", "scrapbook", "retro_futurism", "HatsuneMiku", diff --git a/src/infrastructure/reporting/templates/ATRI/activity_chart.html b/src/infrastructure/reporting/templates/ATRI/activity_chart.html new file mode 100644 index 0000000..188885f --- /dev/null +++ b/src/infrastructure/reporting/templates/ATRI/activity_chart.html @@ -0,0 +1,53 @@ +
+
+ {% for hour_data in chart_data %} + {% set ratio = loop.index0 / ((chart_data|length - 1) if (chart_data|length - 1) > 0 else 1) %} + {% if ratio < 0.3333 %} + {% set local_ratio = ratio / 0.3333 %} + {% set top_red = (210 + local_ratio * 45)|round|int %} + {% set top_green = (225 + local_ratio * 15)|round|int %} + {% set top_blue = (255 - local_ratio * 25)|round|int %} + {% set bottom_red = (170 + local_ratio * 85)|round|int %} + {% set bottom_green = (190 - local_ratio * 5)|round|int %} + {% set bottom_blue = (255 - local_ratio * 55)|round|int %} + {% elif ratio < 0.6666 %} + {% set local_ratio = (ratio - 0.3333) / 0.3333 %} + {% set top_red = (255 - local_ratio * 20)|round|int %} + {% set top_green = (240 + local_ratio * 15)|round|int %} + {% set top_blue = (230 + local_ratio * 10)|round|int %} + {% set bottom_red = (255 - local_ratio * 105)|round|int %} + {% set bottom_green = (185 + local_ratio * 45)|round|int %} + {% set bottom_blue = 200 %} + {% else %} + {% set local_ratio = (ratio - 0.6666) / 0.3334 %} + {% set top_red = (235 - local_ratio * 25)|round|int %} + {% set top_green = (255 - local_ratio * 30)|round|int %} + {% set top_blue = (240 + local_ratio * 15)|round|int %} + {% set bottom_red = (150 + local_ratio * 20)|round|int %} + {% set bottom_green = (230 - local_ratio * 40)|round|int %} + {% set bottom_blue = (200 + local_ratio * 55)|round|int %} + {% endif %} + {% set count_red = (bottom_red * 0.7)|round|int %} + {% set count_green = (bottom_green * 0.7)|round|int %} + {% set count_blue = (bottom_blue * 0.7)|round|int %}
+
+ {{hour_data.count}} +
+
+ {{hour_data.hour}} +
+ {% endfor %} +
+
\ No newline at end of file diff --git a/src/infrastructure/reporting/templates/ATRI/chat_quality_item.html b/src/infrastructure/reporting/templates/ATRI/chat_quality_item.html new file mode 100644 index 0000000..542403a --- /dev/null +++ b/src/infrastructure/reporting/templates/ATRI/chat_quality_item.html @@ -0,0 +1,155 @@ + + +
+
+
+
{{ title }}
+
{{ subtitle }}
+
+
+ +
+ {% for dim in dimensions %} +
+
{{ dim.name }}
+
+
+
+
{{ dim.percentage }}%
+
+ {% endfor %} +
+ +
+ {% for dim in dimensions %} +
+ {{ dim.name }} +
{{ dim.comment }}
+
+ {% endfor %} +
+ +
{{ summary }}
+
\ No newline at end of file diff --git a/src/infrastructure/reporting/templates/ATRI/html_template.html b/src/infrastructure/reporting/templates/ATRI/html_template.html new file mode 100644 index 0000000..403880d --- /dev/null +++ b/src/infrastructure/reporting/templates/ATRI/html_template.html @@ -0,0 +1,3070 @@ + + + + + + + ATRI 群聊日报 · {{ current_date }} + + + + + +
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ ATRI decor + +
+
+
+ +
+
+
A.T.R.I · Daily Communication Report
+

亚托莉的群聊观测日志

+
+ 主人,今天群里的大家也超级精神呢!身为高性能的亚托莉,已经把所有闪闪发光的聊天记忆,像打捞海底宝藏一样全都收集好啦! +
+
+
+
REPORT GENERATED
+
+
{{ current_date }}
{{ current_datetime }}
+
+
+ +
+
+
+
+ + + +
+ Overview + cute icon +
+

来看看今天都发生了什么吧!

+
+ 报告主人!今天一共捕获了 {{ message_count }} 条消息,有 {{ participant_count }} + 位群友浮出水面参与了互动哦!我都仔细做好了备忘录哦,哼哼! +
+ ATRI main +
+ +
+
+
+
MOST ACTIVE PERIOD
+
{{ current_datetime }}
+
{{ most_active_period }}
+
+ 这段时间的心跳值达到最高峰!大家的讨论就像退缩时沙滩上的贝壳一样密集,是今天最棒的高光时刻! +
+
+
+ ATRI peak +
+
+ +
+
+
+ +
+
+
{{ message_count }}
+
消息总数
+
+
+
+
+ +
+
+
{{ participant_count }}
+
参与人数
+
+
+
+
+ +
+
+
{{ total_characters }}
+
总字符数
+
+
+
+
+ +
+
+
{{ emoji_count }}
+
表情数量
+
+
+
+ +
+
+
+
+ +
+
+

心跳潮汐kawaii icon

+
一整天的心跳节拍,由亚托莉为您完美记录
+
+
+
TIDE CHART badge icon +
+
+
{{ hourly_chart_html | safe }}
+
+ +
+
+
+
+ +
+
+

高亮记忆碎片kawaii icon

+
亚托莉捕获的最亮眼的记忆碎片!
+
+
+
TOPIC BOARD badge icon +
+
+
{{ topics_html | safe }}
+
+ +
+
+
+
+ +
+
+

神人名片颁发kawaii icon

+
颁发给各位的高性能称号!
+
+
+
SPOTLIGHT badge icon +
+
+
{{ titles_html | safe }}
+
+ +
+
+
+
+ +
+
+

亚托莉的宝藏瓶kawaii icon

+
亚托莉偷偷记在小本子上的宝藏名言!
+
+
+
PRECIOUS WORDS badge icon +
+
+
{{ quotes_html | safe }}
+
+ + {% if chat_quality_html %} +
+
+
+
+ +
+
+

亚托莉观测报告kawaii icon

+
来自高性能亚托莉的每日特别观测报告!
+
+
+
GROUP VIBE badge icon +
+
+
{{ chat_quality_html | safe }}
+
+ {% endif %} + +
+
+
+
+ +
+
+

能量解析雷达kawaii icon

+
维持亚托莉运行与心跳的能量消耗~
+
+
+
ENERGY COST badge icon +
+
+
+
+
总消耗
+
{{ total_tokens }}
+
+
+
提示词 Token
+
{{ prompt_tokens }}
+
+
+
生成内容 Token
+
{{ completion_tokens }}
+
+
+
+ + +
+
+ + + + + \ No newline at end of file diff --git a/src/infrastructure/reporting/templates/ATRI/image_template.html b/src/infrastructure/reporting/templates/ATRI/image_template.html new file mode 100644 index 0000000..25f572f --- /dev/null +++ b/src/infrastructure/reporting/templates/ATRI/image_template.html @@ -0,0 +1,1897 @@ + + + + + + + ATRI 群聊日报 · {{ current_date }} + + + + + +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ ATRI decor + +
+
+
+
A.T.R.I · Daily Communication Report
+

亚托莉的群聊观测日志

+
+ 主人,今天群里的大家也超级精神呢!身为高性能的亚托莉,已经把所有闪闪发光的聊天记忆,像打捞海底宝藏一样全都收集好啦! +
+
+
+
REPORT GENERATED
+
+
{{ current_date }}
{{ current_datetime }}
+
+
+ +
+
+
+
+ + + +
+ Overview + cute icon +
+

来看看今天
都发生了什
么吧!

+
+ 报告主人!今天一共捕获了 {{ message_count }} 条消息,有 {{ participant_count }} + 位群友浮出水面参与了互动哦!我都仔细做好了备忘录哦,哼哼! +
+ ATRI main +
+ +
+
+
+
MOST ACTIVE PERIOD
+
{{ current_datetime }}
+
{{ most_active_period }}
+
+ 这段时间的心跳值达到最高峰!大家的讨论就像退缩时沙滩上的贝壳一样密集,是今天最棒的高光时刻! +
+
+
+ ATRI peak +
+
+ +
+
+
+ +
+
+
{{ message_count }}
+
消息总数
+
+
+
+
+ +
+
+
{{ participant_count }}
+
参与人数
+
+
+
+
+ +
+
+
{{ total_characters }}
+
总字符数
+
+
+
+
+ +
+
+
{{ emoji_count }}
+
表情数量
+
+
+
+ +
+
+
+
+ +
+
+

心跳潮汐kawaii icon

+
一整天的心跳节拍,由亚托莉为您完美记录
+
+
+
TIDE CHART badge icon
+
+
{{ hourly_chart_html | safe }}
+
+ +
+
+
+
+ +
+
+

高亮记忆碎片kawaii icon

+
亚托莉捕获的最亮眼的记忆碎片!
+
+
+
TOPIC BOARD badge icon
+
+
{{ topics_html | safe }}
+
+ +
+
+
+
+ +
+
+

神人名片颁发kawaii icon

+
颁发给各位的高性能称号!
+
+
+
SPOTLIGHT badge icon
+
+
{{ titles_html | safe }}
+
+ +
+
+
+
+ +
+
+

亚托莉的宝藏瓶kawaii icon

+
亚托莉偷偷记在小本子上的宝藏名言!
+
+
+
PRECIOUS WORDS badge icon
+
+
{{ quotes_html | safe }}
+
+ + {% if chat_quality_html %} +
+
+
+
+ +
+
+

亚托莉观测报告kawaii icon

+
来自高性能亚托莉的每日特别观测报告!
+
+
+
GROUP VIBE badge icon
+
+
{{ chat_quality_html | safe }}
+
+ {% endif %} + +
+
+
+
+ +
+
+

能量解析雷达kawaii icon

+
维持亚托莉运行与心跳的能量消耗~
+
+
+
ENERGY COST badge icon
+
+
+
+
总消耗
+
{{ total_tokens }}
+
+
+
提示词 Token
+
{{ prompt_tokens }}
+
+
+
生成内容 Token
+
{{ completion_tokens }}
+
+
+
+ + +
+
+ + + + \ No newline at end of file diff --git a/src/infrastructure/reporting/templates/ATRI/pdf_template.html b/src/infrastructure/reporting/templates/ATRI/pdf_template.html new file mode 100644 index 0000000..a270d8a --- /dev/null +++ b/src/infrastructure/reporting/templates/ATRI/pdf_template.html @@ -0,0 +1,569 @@ + + + + + + ATRI 群聊日报 · PDF版 + + + +
+
+

ATRI 群聊日报 · {{ current_date }}

+

{{current_datetime}}

+
+ +
+
+
今日群聊概览
+

今天的聊天像夏日的海风,温柔又热闹。

+
+ 今天共有 {{ message_count }} 条消息,来自 {{ participant_count }} 位成员。我已经把这些温暖的对话整理好了,揉进这份属于你们的日报里。 +
+
+
+
MOST ACTIVE PERIOD
+
{{ current_datetime }}
+
{{ most_active_period }}
+
这段时间的讨论最集中,像潮水推到岸边一样热烈,是今天群聊最明亮的一段波峰。
+
+
+ +
+
+
{{message_count}}
+
总消息数
+
+
+
{{participant_count}}
+
参与人数
+
+
+
{{total_characters}}
+
总字符数
+
+
+
{{emoji_count}}
+
表情数量
+
+
+ +
+

活跃潮汐

+
+ {{hourly_chart_html}} +
+
+ +
+

热门话题

+ +
+ +
+

今日称号

+ +
+ +
+

今日金句

+
+ {{quotes_html | safe}} +
+
+ +
+

Token 统计

+
+
+
+ 总消耗 + {{total_tokens}} tokens +
+
+ 提示词 Token + {{prompt_tokens}} tokens +
+
+ 生成内容 Token + {{completion_tokens}} tokens +
+
+
+
+ + +
+ + \ No newline at end of file diff --git a/src/infrastructure/reporting/templates/ATRI/quote_item.html b/src/infrastructure/reporting/templates/ATRI/quote_item.html new file mode 100644 index 0000000..771fc3a --- /dev/null +++ b/src/infrastructure/reporting/templates/ATRI/quote_item.html @@ -0,0 +1,33 @@ +{% set quote_emojis = [ + 'https://tc.ciallo.ccwu.cc/file/1775132814629_1774881270686_爱心.gif', + 'https://tc.ciallo.ccwu.cc/file/1775132815504_1774881268554_可爱.gif', + 'https://tc.ciallo.ccwu.cc/file/1775132809943_1774881264350_睡觉.gif', + 'https://tc.ciallo.ccwu.cc/file/1775175892953_1774881267664_舔屏幕.gif' +] %} +{% for quote in quotes %} +
+
+
+ {% if quote.avatar_url %} +
+ +
+ {% endif %} +
+ +
+
{{ quote.sender }}
+
+
+
{{ quote.content }}
+
+ 金句表情 +
+
+ 📝 亚托莉的高性能分析: + {{ quote.reason | safe }} +
+
+
+
+{% endfor %} \ No newline at end of file diff --git a/src/infrastructure/reporting/templates/ATRI/topic_item.html b/src/infrastructure/reporting/templates/ATRI/topic_item.html new file mode 100644 index 0000000..43d5e01 --- /dev/null +++ b/src/infrastructure/reporting/templates/ATRI/topic_item.html @@ -0,0 +1,44 @@ +{% set topic_emojis = [ +'https://tc.ciallo.ccwu.cc/file/1775132804506_1774881263342_观察.gif', +'https://tc.ciallo.ccwu.cc/file/1775132805081_1774881262835_疑惑.gif', +'https://tc.ciallo.ccwu.cc/file/1775132815504_1774881268554_可爱.gif', +'https://tc.ciallo.ccwu.cc/file/1775132817115_1774881269400_可爱-1.gif', +'https://tc.ciallo.ccwu.cc/file/1775132805485_1774881263748_可爱-3.gif' +] %} +{% set topic_rank_colors = [ +{'bg': 'linear-gradient(135deg, #a9d8ff 0%, #8fc5ff 48%, #8aaeff 100%)', 'text': '#ffffff', 'shadow': 'rgba(126, 177, +255, 0.34)', 'border': 'rgba(255, 255, 255, 0.82)'}, +{'bg': 'linear-gradient(135deg, #ffc8d8 0%, #ffb7cd 50%, #ffb2b2 100%)', 'text': '#ffffff', 'shadow': 'rgba(255, 176, +204, 0.32)', 'border': 'rgba(255, 255, 255, 0.8)'}, +{'bg': 'linear-gradient(135deg, #ffe0ad 0%, #ffd29f 46%, #ffc3b8 100%)', 'text': '#ffffff', 'shadow': 'rgba(255, 199, +142, 0.3)', 'border': 'rgba(255, 255, 255, 0.8)'}, +{'bg': 'linear-gradient(135deg, #c7efe7 0%, #bfe7ff 52%, #c8d8ff 100%)', 'text': '#ffffff', 'shadow': 'rgba(163, 221, +230, 0.28)', 'border': 'rgba(255, 255, 255, 0.8)'} +] %} +{% for topic in topics %} +{% set rank = topic_rank_colors[loop.index0 % (topic_rank_colors|length)] %} +
  • +
    +
    + + #{{ topic.index }} + + {{ topic.topic.topic }} +
    +
    + {% if topic.topic.count is defined %} +

    讨论热度: {{ topic.topic.count }} 次提及

    + {% endif %} +

    参与的群友: {{ topic.contributors }}

    + {% if topic.detail %} +
    + {{ topic.detail | safe }} +
    + {% endif %} +
    +
    + 话题表情 +
  • +{% endfor %} \ No newline at end of file diff --git a/src/infrastructure/reporting/templates/ATRI/user_title_item.html b/src/infrastructure/reporting/templates/ATRI/user_title_item.html new file mode 100644 index 0000000..6683915 --- /dev/null +++ b/src/infrastructure/reporting/templates/ATRI/user_title_item.html @@ -0,0 +1,39 @@ +{% set title_emojis = [ + 'https://tc.ciallo.ccwu.cc/file/1775132813334_1774881267181_得意.gif', + 'https://tc.ciallo.ccwu.cc/file/1775132808652_1774881267385_得意-1.gif', + 'https://tc.ciallo.ccwu.cc/file/1775132804506_1774881263342_观察.gif', + 'https://tc.ciallo.ccwu.cc/file/1775132811492_1774881264336_不要.gif' +] %} +{% set title_badge_colors = [ + {'bg': 'linear-gradient(135deg, #ffcadf 0%, #ffc1cc 45%, #ffd9b8 100%)', 'text': '#b85c7b', 'shadow': 'rgba(255, 177, 203, 0.28)', 'border': 'rgba(255, 184, 210, 0.72)'}, + {'bg': 'linear-gradient(135deg, #bfe7ff 0%, #c8dbff 48%, #d8ccff 100%)', 'text': '#5d71b8', 'shadow': 'rgba(168, 198, 255, 0.26)', 'border': 'rgba(173, 204, 255, 0.74)'}, + {'bg': 'linear-gradient(135deg, #c7f3df 0%, #d3f1ff 50%, #e1ddff 100%)', 'text': '#4e8e88', 'shadow': 'rgba(161, 232, 205, 0.24)', 'border': 'rgba(178, 230, 214, 0.72)'}, + {'bg': 'linear-gradient(135deg, #ffe5b7 0%, #ffd6c7 48%, #ffd7ef 100%)', 'text': '#b57752', 'shadow': 'rgba(255, 210, 163, 0.28)', 'border': 'rgba(255, 214, 178, 0.76)'} +] %} +{% for title in titles %} +{% set badge = title_badge_colors[loop.index0 % (title_badge_colors|length)] %} +
  • +
    +
    + {% if title.avatar_data %} + 头像 + {% endif %} +
    +
    + {{ title.name }} + + {{ title.title }} + +
    +
    +

    MBTI: {{ title.mbti }}

    +

    称号理由: {{ title.reason }}

    +
    +
    +
    +
    + 称号表情 +
  • +{% endfor %} \ No newline at end of file