This commit is contained in:
sansan 2025-10-21 11:18:42 +08:00
parent 09826a5bff
commit 601b6cd1bd
4 changed files with 41 additions and 59 deletions

View File

@ -49,7 +49,7 @@ jobs:
with: with:
context: . context: .
file: ./docker/Dockerfile file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

View File

@ -6,21 +6,15 @@ WORKDIR /app
ARG TARGETARCH ARG TARGETARCH
ENV SUPERCRONIC_VERSION=v0.2.34 ENV SUPERCRONIC_VERSION=v0.2.34
# supercronic + locale + 编译依赖
RUN set -ex && \ RUN set -ex && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends \ # 添加 locales 包
curl \ apt-get install -y --no-install-recommends curl ca-certificates locales && \
ca-certificates \ # 配置中文 locale
locales \
gcc \
python3-dev \
libffi-dev \
build-essential && \
sed -i -e 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i -e 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen && \ locale-gen && \
# 根据架构选择并下载 supercronic # 下载 supercronic只支持 amd64 和 arm64
case ${TARGETARCH} in \ case ${TARGETARCH} in \
amd64) \ amd64) \
export SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/supercronic-linux-amd64; \ export SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/supercronic-linux-amd64; \
@ -32,22 +26,13 @@ RUN set -ex && \
export SUPERCRONIC_SHA1SUM=4ab6343b52bf9da592e8b4bb7ae6eb5a8e21b71e; \ export SUPERCRONIC_SHA1SUM=4ab6343b52bf9da592e8b4bb7ae6eb5a8e21b71e; \
export SUPERCRONIC=supercronic-linux-arm64; \ export SUPERCRONIC=supercronic-linux-arm64; \
;; \ ;; \
arm) \
export SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/supercronic-linux-arm; \
export SUPERCRONIC_SHA1SUM=4ba4cd0da62082056b6def085fa9377d965fbe01; \
export SUPERCRONIC=supercronic-linux-arm; \
;; \
386) \
export SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/supercronic-linux-386; \
export SUPERCRONIC_SHA1SUM=80b4fff03a8d7bf2f24a1771f37640337855e949; \
export SUPERCRONIC=supercronic-linux-386; \
;; \
*) \ *) \
echo "Unsupported architecture: ${TARGETARCH}"; \ echo "Unsupported architecture: ${TARGETARCH}. Only amd64 and arm64 are supported."; \
exit 1; \ exit 1; \
;; \ ;; \
esac && \ esac && \
echo "Downloading supercronic for ${TARGETARCH} from ${SUPERCRONIC_URL}" && \ echo "Downloading supercronic for ${TARGETARCH} from ${SUPERCRONIC_URL}" && \
# 添加重试机制和超时设置
for i in 1 2 3 4 5; do \ for i in 1 2 3 4 5; do \
echo "Download attempt $i/5"; \ echo "Download attempt $i/5"; \
if curl --fail --silent --show-error --location --retry 3 --retry-delay 2 --connect-timeout 30 --max-time 120 -o "$SUPERCRONIC" "$SUPERCRONIC_URL"; then \ if curl --fail --silent --show-error --location --retry 3 --retry-delay 2 --connect-timeout 30 --max-time 120 -o "$SUPERCRONIC" "$SUPERCRONIC_URL"; then \
@ -66,9 +51,9 @@ RUN set -ex && \
chmod +x "$SUPERCRONIC" && \ chmod +x "$SUPERCRONIC" && \
mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" && \ mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" && \
ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic && \ ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic && \
# 验证安装
supercronic -version && \ supercronic -version && \
apt-get remove -y curl gcc python3-dev libffi-dev build-essential && \ apt-get remove -y curl && \
apt-get autoremove -y && \
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
@ -86,6 +71,7 @@ RUN sed -i 's/\r$//' /entrypoint.sh.tmp && \
chmod +x manage.py && \ chmod +x manage.py && \
mkdir -p /app/config /app/output mkdir -p /app/config /app/output
# 添加 locale 相关环境变量
ENV PYTHONUNBUFFERED=1 \ ENV PYTHONUNBUFFERED=1 \
CONFIG_PATH=/app/config/config.yaml \ CONFIG_PATH=/app/config/config.yaml \
FREQUENCY_WORDS_PATH=/app/config/frequency_words.txt \ FREQUENCY_WORDS_PATH=/app/config/frequency_words.txt \

View File

@ -20,7 +20,7 @@ import requests
import yaml import yaml
VERSION = "2.4.4" VERSION = "3.0.1"
# === SMTP邮件配置 === # === SMTP邮件配置 ===

View File

@ -11,7 +11,7 @@
[![GitHub Stars](https://img.shields.io/github/stars/sansan0/TrendRadar?style=flat-square&logo=github&color=yellow)](https://github.com/sansan0/TrendRadar/stargazers) [![GitHub Stars](https://img.shields.io/github/stars/sansan0/TrendRadar?style=flat-square&logo=github&color=yellow)](https://github.com/sansan0/TrendRadar/stargazers)
[![GitHub Forks](https://img.shields.io/github/forks/sansan0/TrendRadar?style=flat-square&logo=github&color=blue)](https://github.com/sansan0/TrendRadar/network/members) [![GitHub Forks](https://img.shields.io/github/forks/sansan0/TrendRadar?style=flat-square&logo=github&color=blue)](https://github.com/sansan0/TrendRadar/network/members)
[![License](https://img.shields.io/badge/license-GPL--3.0-blue.svg?style=flat-square)](LICENSE) [![License](https://img.shields.io/badge/license-GPL--3.0-blue.svg?style=flat-square)](LICENSE)
[![Version](https://img.shields.io/badge/version-v3.0.0-green.svg?style=flat-square)](https://github.com/sansan0/TrendRadar) [![Version](https://img.shields.io/badge/version-v3.0.1-green.svg?style=flat-square)](https://github.com/sansan0/TrendRadar)
[![企业微信通知](https://img.shields.io/badge/企业微信-通知-00D4AA?style=flat-square)](https://work.weixin.qq.com/) [![企业微信通知](https://img.shields.io/badge/企业微信-通知-00D4AA?style=flat-square)](https://work.weixin.qq.com/)
[![Telegram通知](https://img.shields.io/badge/Telegram-通知-00D4AA?style=flat-square)](https://telegram.org/) [![Telegram通知](https://img.shields.io/badge/Telegram-通知-00D4AA?style=flat-square)](https://telegram.org/)
@ -500,6 +500,12 @@ GitHub 一键 Fork 即可使用,无需编程基础。
- **小版本更新**:从 v2.x 升级到 v2.y, 用本项目的 `main.py` 代码替换你 fork 仓库中的对应文件 - **小版本更新**:从 v2.x 升级到 v2.y, 用本项目的 `main.py` 代码替换你 fork 仓库中的对应文件
- **大版本升级**:从 v1.x 升级到 v2.y, 建议删除现有 fork 后重新 fork这样更省力且避免配置冲突 - **大版本升级**:从 v1.x 升级到 v2.y, 建议删除现有 fork 后重新 fork这样更省力且避免配置冲突
### 2025/10/21 - v3.0.1
- **更新内容**
- 尝试修复 ntfy 推送编码问题 + 2
- docker 移除对 linux/arm/v7 架构的支持
### 2025/10/20 - v3.0.0 ### 2025/10/20 - v3.0.0
**重大更新 - AI 分析功能上线** 🤖 **重大更新 - AI 分析功能上线** 🤖
@ -510,11 +516,6 @@ GitHub 一键 Fork 即可使用,无需编程基础。
- 自然语言交互:通过对话方式查询和分析新闻数据 - 自然语言交互:通过对话方式查询和分析新闻数据
- 多客户端支持Claude Desktop、Cherry Studio、Cursor、Cline 等 - 多客户端支持Claude Desktop、Cherry Studio、Cursor、Cline 等
- **快速部署方案**
- Cherry Studio 一键部署推荐新手GUI 配置5分钟完成
- Claude Desktop 配置技术用户JSON 配置文件
- 完整的部署文档和使用指南
- **分析能力** - **分析能力**
- 话题趋势分析(热度追踪、生命周期、爆火检测、趋势预测) - 话题趋势分析(热度追踪、生命周期、爆火检测、趋势预测)
- 数据洞察(平台对比、活跃度统计、关键词共现) - 数据洞察(平台对比、活跃度统计、关键词共现)
@ -1314,13 +1315,8 @@ Cherry Studio 提供 GUI 配置界面,可快速部署。
> 心意到就行,收到的**点赞**用于提高开发者开源的积极性。**点赞**已收录于**致谢名单** > 心意到就行,收到的**点赞**用于提高开发者开源的积极性。**点赞**已收录于**致谢名单**
- **GitHub Issues**:适合针对性强的解答。提问时请提供完整信息(截图、错误日志、系统环境等)。 - **GitHub Issues**:适合针对性强的解答。提问时请提供完整信息(截图、错误日志、系统环境等)。
- **公众号交流**:适合快速咨询。尽量别私信,建议优先在相关文章下的公共留言区交流,有个收敛度 - **公众号交流**:适合快速咨询。建议优先在相关文章下的公共留言区交流,如私信,请文明礼貌用语😉
> 对于极少数私信中表达的那种'摸索了好久都部署不了'的焦急心态,我能理解,但我认为这不足以成为我必须立刻抽空帮你解决的理由
>
> 请舒缓情绪后再表达,别让我觉得'我分享了项目,你部署不了反而首先怪我',对于这种非商业化的个人开源小作品,多一点担待~好不?😉
>
> 项目的 issues 和留言我还算卖力解决,除了有自己写的项目哪怕再烂也得含泪😢维护的念头,主要还是因为有上面感谢的那群人的支持😘
|公众号关注 |微信点赞 | 支付宝点赞 | |公众号关注 |微信点赞 | 支付宝点赞 |
|:---:|:---:|:---:| |:---:|:---:|:---:|