diff --git a/README.md b/README.md index e26e50c..a13cb3d 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,10 @@ _✨ 一个基于 AstrBot 的智能群聊分析插件,支持 **QQ (OneBot)**

ATRI

ATRI + +

BlueArchive

+ BlueArchive +

Simple

simple diff --git a/_conf_schema.json b/_conf_schema.json index 7452549..4a8439f 100644 --- a/_conf_schema.json +++ b/_conf_schema.json @@ -73,6 +73,7 @@ "description": "报告模板", "options": [ "ATRI", + "BlueArchive", "scrapbook", "retro_futurism", "HatsuneMiku", diff --git a/assets/BlueArchive-demo.jpg b/assets/BlueArchive-demo.jpg new file mode 100644 index 0000000..c0dffee Binary files /dev/null and b/assets/BlueArchive-demo.jpg differ diff --git a/src/infrastructure/reporting/templates/BlueArchive/activity_chart.html b/src/infrastructure/reporting/templates/BlueArchive/activity_chart.html new file mode 100644 index 0000000..180a55e --- /dev/null +++ b/src/infrastructure/reporting/templates/BlueArchive/activity_chart.html @@ -0,0 +1,40 @@ +
+ {% for item in chart_data %} + {% set bar_percentage = item.percentage | float %} + {% if bar_percentage < 0 %} + {% set bar_percentage = 0 %} + {% elif bar_percentage > 100 %} + {% set bar_percentage = 100 %} + {% endif %} + + {% set bar_bg = 'var(--ba-blue)' %} + {% set bar_height = '4px' %} + {% set bar_opacity = '1' %} + + {% if item.count == 0 %} + {% set bar_bg = 'var(--ba-text-muted)' %} + {% set bar_height = '4px' %} + {% set bar_opacity = '0.15' %} + {% elif bar_percentage >= 70 %} + {% set bar_bg = 'var(--ba-accent-orange)' %} + {% set bar_height = bar_percentage ~ '%' %} + {% elif bar_percentage >= 30 %} + {% set bar_bg = 'var(--ba-accent-green)' %} + {% set bar_height = bar_percentage ~ '%' %} + {% else %} + {% set bar_bg = 'var(--ba-blue)' %} + {% set bar_height = bar_percentage ~ '%' %} + {% endif %} + +
+ {% if item.count > 0 %} +
{{ item.count }}
+ {% endif %} + + {% set style_str = 'height: ' ~ bar_height ~ '; background: ' ~ bar_bg ~ '; opacity: ' ~ bar_opacity ~ ';' %} +
+ +
{{ "%02d" | format(item.hour) }}
+
+ {% endfor %} +
diff --git a/src/infrastructure/reporting/templates/BlueArchive/chat_quality_item.html b/src/infrastructure/reporting/templates/BlueArchive/chat_quality_item.html new file mode 100644 index 0000000..24340fc --- /dev/null +++ b/src/infrastructure/reporting/templates/BlueArchive/chat_quality_item.html @@ -0,0 +1,62 @@ +
+
+
{{ title }}
+
{{ subtitle }}
+
+ +
+
+ {% set colors = ['#3593f3', '#58c3e5', '#7c6ff7', '#f06292', '#ff9800', '#66bb6a', '#ffc107', '#26c6da'] %} + {% for dim in dimensions %} + {% set safe_percentage = dim.percentage|float %} + {% if safe_percentage < 0 %} + {% set safe_percentage = 0 %} + {% elif safe_percentage > 100 %} + {% set safe_percentage = 100 %} + {% endif %} + {% if safe_percentage > 0 %} +
+ + {{ dim.name }} + +
+ {% endif %} + {% endfor %} +
+
+ +
+ {% set colors = ['#3593f3', '#58c3e5', '#7c6ff7', '#f06292', '#ff9800', '#66bb6a', '#ffc107', '#26c6da'] %} + {% for dim in dimensions %} + {% set safe_percentage = dim.percentage|float %} + {% if safe_percentage < 0 %} + {% set safe_percentage = 0 %} + {% elif safe_percentage > 100 %} + {% set safe_percentage = 100 %} + {% endif %} + {% if safe_percentage > 0 %} +
+
+ {{ dim.name }} + {{ '%.1f'|format(safe_percentage) }}% +
+ {{ dim.comment }} +
+ {% endif %} + {% endfor %} +
+ +
+
+ Assistant +
+
+
{{ summary }}
+
+
+
diff --git a/src/infrastructure/reporting/templates/BlueArchive/html_template.html b/src/infrastructure/reporting/templates/BlueArchive/html_template.html new file mode 100644 index 0000000..8fc433f --- /dev/null +++ b/src/infrastructure/reporting/templates/BlueArchive/html_template.html @@ -0,0 +1,1279 @@ + + + + + + + 阿洛娜的今日群聊速报! · {{current_datetime}} + + + + + + + + + + + +
+ +
+
+ 阿洛娜 +
+

老师,这是今天的作战报告!

+
+
+
+
+

阿洛娜的今日群聊速报!

+ {{current_date}} +
+
+ +
+
+
+
+ +
+
{{message_count}}
+
消息总数
+
+
+
+ +
+
{{participant_count}}
+
参与人数
+
+
+
+ +
+
{{emoji_count}}
+
表情统计
+
+
+
+ +
+
{{total_characters}}
+
总字符数
+
+
+ +
+
⚡ Highlight Time
+
{{most_active_period}}
+
最活跃的时刻
+
+
+ +
+ +
+
+
+ +
+ 24H 活跃轨迹 +
+
+ {{hourly_chart_html | safe}} +
+
+ + {{topics_html | safe}} + {{titles_html | safe}} + {{quotes_html | safe}} + + {% if chat_quality_html %} +
+
+
+ +
+ 群聊质量锐评 +
+ {{ chat_quality_html | safe }} +
+ {% endif %} + +
+ + + +
+ + + diff --git a/src/infrastructure/reporting/templates/BlueArchive/image_template.html b/src/infrastructure/reporting/templates/BlueArchive/image_template.html new file mode 100644 index 0000000..8fc433f --- /dev/null +++ b/src/infrastructure/reporting/templates/BlueArchive/image_template.html @@ -0,0 +1,1279 @@ + + + + + + + 阿洛娜的今日群聊速报! · {{current_datetime}} + + + + + + + + + + + +
+ +
+
+ 阿洛娜 +
+

老师,这是今天的作战报告!

+
+
+
+
+

阿洛娜的今日群聊速报!

+ {{current_date}} +
+
+ +
+
+
+
+ +
+
{{message_count}}
+
消息总数
+
+
+
+ +
+
{{participant_count}}
+
参与人数
+
+
+
+ +
+
{{emoji_count}}
+
表情统计
+
+
+
+ +
+
{{total_characters}}
+
总字符数
+
+
+ +
+
⚡ Highlight Time
+
{{most_active_period}}
+
最活跃的时刻
+
+
+ +
+ +
+
+
+ +
+ 24H 活跃轨迹 +
+
+ {{hourly_chart_html | safe}} +
+
+ + {{topics_html | safe}} + {{titles_html | safe}} + {{quotes_html | safe}} + + {% if chat_quality_html %} +
+
+
+ +
+ 群聊质量锐评 +
+ {{ chat_quality_html | safe }} +
+ {% endif %} + +
+ + + +
+ + + diff --git a/src/infrastructure/reporting/templates/BlueArchive/quote_item.html b/src/infrastructure/reporting/templates/BlueArchive/quote_item.html new file mode 100644 index 0000000..4e504bf --- /dev/null +++ b/src/infrastructure/reporting/templates/BlueArchive/quote_item.html @@ -0,0 +1,34 @@ +{% if quotes %} +
+
+
+ +
+ 群贤毕至 Bible Quotes +
+ {% for quote in quotes %} +
+
+
+ {% if quote.avatar_url %} +
+ +
+ {% endif %} +
+ +
+
{{ quote.sender }}
+
+
{{ quote.content }}
+
+
+ 🤣👉 AI 锐评: + {{ quote.reason | safe }} +
+
+
+
+ {% endfor %} +
+{% endif %} diff --git a/src/infrastructure/reporting/templates/BlueArchive/topic_item.html b/src/infrastructure/reporting/templates/BlueArchive/topic_item.html new file mode 100644 index 0000000..59405f6 --- /dev/null +++ b/src/infrastructure/reporting/templates/BlueArchive/topic_item.html @@ -0,0 +1,20 @@ +{% if topics %} +
+
+
+ +
+ 今日话题 Topics +
+ {% for topic in topics %} +
+
{{ "%02d" | format(topic.index) }}
+
+
{{ topic.topic.topic }}
+
🙋‍♀️ 参与者: {{ topic.contributors }}
+
{{ topic.detail | safe }}
+
+
+ {% endfor %} +
+{% endif %} diff --git a/src/infrastructure/reporting/templates/BlueArchive/user_title_item.html b/src/infrastructure/reporting/templates/BlueArchive/user_title_item.html new file mode 100644 index 0000000..ce7794f --- /dev/null +++ b/src/infrastructure/reporting/templates/BlueArchive/user_title_item.html @@ -0,0 +1,40 @@ +{% if titles %} +
+
+
+ +
+ 群友画像 Portraits +
+
+ {% for title in titles %} +
+
+
+ {% if title.avatar_data %} + 头像 + {% else %} + + + + {% endif %} +
+
+
{{ title.name }}
+
+ {{ title.title }} + {{ title.profile_display or title.mbti }} +
+
+
+
+ {{ title.reason }} +
+ {% if title.profile_image %} + + {% endif %} +
+ {% endfor %} +
+
+{% endif %}