diff --git a/.claude/settings.local.json b/.claude/settings.local.json index c7768c5..2b47cb6 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -32,7 +32,8 @@ "WebFetch(domain:bocha-ai.feishu.cn)", "Bash(ls:*)", "Bash(git pull:*)", - "Bash(del nul)" + "Bash(del nul)", + "Bash(git checkout:*)" ] } } diff --git a/.gitignore b/.gitignore index f5d6ed0..da4a9ca 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,15 @@ backup_*.sql *.tmp *.bak *.cache + + # 部署相关文件 + *.patch + *_deploy*.sh + *.backup + + # 用户上传的文件 + static/logos/* + !static/logos/.gitkeep + + # 临时文件 + nul diff --git a/config.py b/config.py index 7a44182..c578a76 100644 --- a/config.py +++ b/config.py @@ -41,6 +41,20 @@ class Config: UPLOAD_FOLDER = 'static/uploads' MAX_CONTENT_LENGTH = 5 * 1024 * 1024 # 5MB ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif', 'webp'} + + # DeepSeek API配置 + DEEPSEEK_API_KEY = os.environ.get('DEEPSEEK_API_KEY') + DEEPSEEK_BASE_URL = os.environ.get('DEEPSEEK_BASE_URL') or 'https://api.deepseek.com' + + # 博查 Web Search API配置 + BOCHA_API_KEY = os.environ.get('BOCHA_API_KEY') + BOCHA_BASE_URL = os.environ.get('BOCHA_BASE_URL') or 'https://api.bocha.cn' + BOCHA_SEARCH_ENDPOINT = '/v1/web-search' + + # 新闻搜索配置 + NEWS_SEARCH_COUNT = 10 # 每次搜索返回的新闻数量 + NEWS_SEARCH_FRESHNESS = 'oneMonth' # 默认搜索一个月内的新闻 + NEWS_SEARCH_SUMMARY = True # 是否显示摘要 # DeepSeek API配置 DEEPSEEK_API_KEY = os.environ.get('DEEPSEEK_API_KEY') diff --git a/manage.sh b/manage.sh index 51cf1e9..d541b14 100644 --- a/manage.sh +++ b/manage.sh @@ -4,7 +4,7 @@ # 用法: ./manage.sh [start|stop|restart|status|logs] APP_NAME="zjpb" -APP_DIR="/www/wwwroot/zjpb" +APP_DIR="/opt/1panel/apps/zjpb" VENV_DIR="$APP_DIR/venv" PID_FILE="$APP_DIR/logs/gunicorn.pid" @@ -14,7 +14,7 @@ case "$1" in start) echo "启动 $APP_NAME..." source $VENV_DIR/bin/activate - gunicorn -c gunicorn_config.py app:app + gunicorn -c gunicorn_config.py wsgi:app echo "$APP_NAME 已启动" ;; diff --git a/manage.sh.backup b/manage.sh.backup new file mode 100644 index 0000000..51cf1e9 --- /dev/null +++ b/manage.sh.backup @@ -0,0 +1,61 @@ +#!/bin/bash + +# ZJPB 应用管理脚本 +# 用法: ./manage.sh [start|stop|restart|status|logs] + +APP_NAME="zjpb" +APP_DIR="/www/wwwroot/zjpb" +VENV_DIR="$APP_DIR/venv" +PID_FILE="$APP_DIR/logs/gunicorn.pid" + +cd $APP_DIR + +case "$1" in + start) + echo "启动 $APP_NAME..." + source $VENV_DIR/bin/activate + gunicorn -c gunicorn_config.py app:app + echo "$APP_NAME 已启动" + ;; + + stop) + echo "停止 $APP_NAME..." + if [ -f $PID_FILE ]; then + kill $(cat $PID_FILE) + echo "$APP_NAME 已停止" + else + echo "PID文件不存在,可能未运行" + fi + ;; + + restart) + $0 stop + sleep 2 + $0 start + ;; + + status) + if [ -f $PID_FILE ]; then + PID=$(cat $PID_FILE) + if ps -p $PID > /dev/null; then + echo "$APP_NAME 正在运行 (PID: $PID)" + else + echo "$APP_NAME 未运行(但PID文件存在)" + fi + else + echo "$APP_NAME 未运行" + fi + ;; + + logs) + echo "实时查看日志(Ctrl+C退出):" + tail -f logs/error.log + ;; + + *) + echo "用法: $0 {start|stop|restart|status|logs}" + exit 1 + ;; +esac + +exit 0 diff --git a/static/logos/logo_009330a33741511f.png b/static/logos/logo_009330a33741511f.png new file mode 100644 index 0000000..86d25ab Binary files /dev/null and b/static/logos/logo_009330a33741511f.png differ diff --git a/static/logos/logo_086fa477815e5f48.png b/static/logos/logo_086fa477815e5f48.png new file mode 100644 index 0000000..aabf2af Binary files /dev/null and b/static/logos/logo_086fa477815e5f48.png differ diff --git a/static/logos/logo_0bf9f5b40bc9f3d5.webp b/static/logos/logo_0bf9f5b40bc9f3d5.webp new file mode 100644 index 0000000..c426f13 Binary files /dev/null and b/static/logos/logo_0bf9f5b40bc9f3d5.webp differ diff --git a/static/logos/logo_0caa6b734c44441e.png b/static/logos/logo_0caa6b734c44441e.png new file mode 100644 index 0000000..82881b5 Binary files /dev/null and b/static/logos/logo_0caa6b734c44441e.png differ diff --git a/static/logos/logo_0cf405192ccd0146.jpeg b/static/logos/logo_0cf405192ccd0146.jpeg new file mode 100644 index 0000000..10df267 Binary files /dev/null and b/static/logos/logo_0cf405192ccd0146.jpeg differ diff --git a/static/logos/logo_10d6a2b3811ae398.png b/static/logos/logo_10d6a2b3811ae398.png new file mode 100644 index 0000000..b529e16 Binary files /dev/null and b/static/logos/logo_10d6a2b3811ae398.png differ diff --git a/static/logos/logo_1fbd5cd39812f9d0.png b/static/logos/logo_1fbd5cd39812f9d0.png new file mode 100644 index 0000000..302def3 Binary files /dev/null and b/static/logos/logo_1fbd5cd39812f9d0.png differ diff --git a/static/logos/logo_214e96cf96888084.jpg b/static/logos/logo_214e96cf96888084.jpg new file mode 100644 index 0000000..764cbdb Binary files /dev/null and b/static/logos/logo_214e96cf96888084.jpg differ diff --git a/static/logos/logo_21a7f8ac8867d715.jpg b/static/logos/logo_21a7f8ac8867d715.jpg new file mode 100644 index 0000000..15eeb4a Binary files /dev/null and b/static/logos/logo_21a7f8ac8867d715.jpg differ diff --git a/static/logos/logo_21d770f54333c4b0.jpeg b/static/logos/logo_21d770f54333c4b0.jpeg new file mode 100644 index 0000000..cd24317 Binary files /dev/null and b/static/logos/logo_21d770f54333c4b0.jpeg differ diff --git a/static/logos/logo_22160f2fb2ace263.png b/static/logos/logo_22160f2fb2ace263.png new file mode 100644 index 0000000..39c790a Binary files /dev/null and b/static/logos/logo_22160f2fb2ace263.png differ diff --git a/static/logos/logo_27849fad6920d06e.png b/static/logos/logo_27849fad6920d06e.png new file mode 100644 index 0000000..e7375d9 Binary files /dev/null and b/static/logos/logo_27849fad6920d06e.png differ diff --git a/static/logos/logo_2b995c80473172de.png b/static/logos/logo_2b995c80473172de.png new file mode 100644 index 0000000..2f11a8a Binary files /dev/null and b/static/logos/logo_2b995c80473172de.png differ diff --git a/static/logos/logo_2cb17cc73c6a4ea6.png b/static/logos/logo_2cb17cc73c6a4ea6.png new file mode 100644 index 0000000..81dcda6 Binary files /dev/null and b/static/logos/logo_2cb17cc73c6a4ea6.png differ diff --git a/static/logos/logo_2d1e980b35dbdb73.png b/static/logos/logo_2d1e980b35dbdb73.png new file mode 100644 index 0000000..8b11c24 Binary files /dev/null and b/static/logos/logo_2d1e980b35dbdb73.png differ diff --git a/static/logos/logo_31713449fe0e3279.jpg b/static/logos/logo_31713449fe0e3279.jpg new file mode 100644 index 0000000..1e99f57 Binary files /dev/null and b/static/logos/logo_31713449fe0e3279.jpg differ diff --git a/static/logos/logo_3cd0e2f01104da8f.webp b/static/logos/logo_3cd0e2f01104da8f.webp new file mode 100644 index 0000000..2830260 Binary files /dev/null and b/static/logos/logo_3cd0e2f01104da8f.webp differ diff --git a/static/logos/logo_3edad18a442b647c.jpeg b/static/logos/logo_3edad18a442b647c.jpeg new file mode 100644 index 0000000..884f8c6 Binary files /dev/null and b/static/logos/logo_3edad18a442b647c.jpeg differ diff --git a/static/logos/logo_4029804b6c1ec871.jpeg b/static/logos/logo_4029804b6c1ec871.jpeg new file mode 100644 index 0000000..b84784c Binary files /dev/null and b/static/logos/logo_4029804b6c1ec871.jpeg differ diff --git a/static/logos/logo_49f74f06f5892603.webp b/static/logos/logo_49f74f06f5892603.webp new file mode 100644 index 0000000..eca34df Binary files /dev/null and b/static/logos/logo_49f74f06f5892603.webp differ diff --git a/static/logos/logo_4b72862d2860be10.svg b/static/logos/logo_4b72862d2860be10.svg new file mode 100644 index 0000000..b5da0e5 --- /dev/null +++ b/static/logos/logo_4b72862d2860be10.svg @@ -0,0 +1,22 @@ + diff --git a/static/logos/logo_4ba98f6d485f7211.png b/static/logos/logo_4ba98f6d485f7211.png new file mode 100644 index 0000000..aaf34fb Binary files /dev/null and b/static/logos/logo_4ba98f6d485f7211.png differ diff --git a/static/logos/logo_4d06dd582d659c7e.png b/static/logos/logo_4d06dd582d659c7e.png new file mode 100644 index 0000000..a48f143 Binary files /dev/null and b/static/logos/logo_4d06dd582d659c7e.png differ diff --git a/static/logos/logo_50e7b9e722dd9bba.jpeg b/static/logos/logo_50e7b9e722dd9bba.jpeg new file mode 100644 index 0000000..a1bc31f Binary files /dev/null and b/static/logos/logo_50e7b9e722dd9bba.jpeg differ diff --git a/static/logos/logo_51eb0f62f4652d66.png b/static/logos/logo_51eb0f62f4652d66.png new file mode 100644 index 0000000..f421caf Binary files /dev/null and b/static/logos/logo_51eb0f62f4652d66.png differ diff --git a/static/logos/logo_54f298fb11566bf6.webp b/static/logos/logo_54f298fb11566bf6.webp new file mode 100644 index 0000000..fe25e58 Binary files /dev/null and b/static/logos/logo_54f298fb11566bf6.webp differ diff --git a/static/logos/logo_553f5b7d65fb33dd.jpeg b/static/logos/logo_553f5b7d65fb33dd.jpeg new file mode 100644 index 0000000..aac10dc Binary files /dev/null and b/static/logos/logo_553f5b7d65fb33dd.jpeg differ diff --git a/static/logos/logo_575688f6a82d77d4.png b/static/logos/logo_575688f6a82d77d4.png new file mode 100644 index 0000000..53fac79 Binary files /dev/null and b/static/logos/logo_575688f6a82d77d4.png differ diff --git a/static/logos/logo_5ac23f7ad6e67263.ico b/static/logos/logo_5ac23f7ad6e67263.ico new file mode 100644 index 0000000..90d74de Binary files /dev/null and b/static/logos/logo_5ac23f7ad6e67263.ico differ diff --git a/static/logos/logo_6bfa8f7b4428a3fb.png b/static/logos/logo_6bfa8f7b4428a3fb.png new file mode 100644 index 0000000..dfbdd5c Binary files /dev/null and b/static/logos/logo_6bfa8f7b4428a3fb.png differ diff --git a/static/logos/logo_7dbcd1d7f937abf9.png b/static/logos/logo_7dbcd1d7f937abf9.png new file mode 100644 index 0000000..0651a6f Binary files /dev/null and b/static/logos/logo_7dbcd1d7f937abf9.png differ diff --git a/static/logos/logo_88a6e9f8cdfead02.png b/static/logos/logo_88a6e9f8cdfead02.png new file mode 100644 index 0000000..e9306e6 Binary files /dev/null and b/static/logos/logo_88a6e9f8cdfead02.png differ diff --git a/static/logos/logo_88abeac22a366309.png b/static/logos/logo_88abeac22a366309.png new file mode 100644 index 0000000..e73a97b Binary files /dev/null and b/static/logos/logo_88abeac22a366309.png differ diff --git a/static/logos/logo_8c840abfb294f707.jpg b/static/logos/logo_8c840abfb294f707.jpg new file mode 100644 index 0000000..88a57a1 Binary files /dev/null and b/static/logos/logo_8c840abfb294f707.jpg differ diff --git a/static/logos/logo_8cf9350f73b2c36d.jpeg b/static/logos/logo_8cf9350f73b2c36d.jpeg new file mode 100644 index 0000000..e679414 Binary files /dev/null and b/static/logos/logo_8cf9350f73b2c36d.jpeg differ diff --git a/static/logos/logo_8d130c222e8d038b.png b/static/logos/logo_8d130c222e8d038b.png new file mode 100644 index 0000000..e97d84b Binary files /dev/null and b/static/logos/logo_8d130c222e8d038b.png differ diff --git a/static/logos/logo_8d34bb9928739303.png b/static/logos/logo_8d34bb9928739303.png new file mode 100644 index 0000000..3f7fb6d Binary files /dev/null and b/static/logos/logo_8d34bb9928739303.png differ diff --git a/static/logos/logo_8e157f69c59d76c2.jpeg b/static/logos/logo_8e157f69c59d76c2.jpeg new file mode 100644 index 0000000..b864f29 Binary files /dev/null and b/static/logos/logo_8e157f69c59d76c2.jpeg differ diff --git a/static/logos/logo_9146a060dca914df.webp b/static/logos/logo_9146a060dca914df.webp new file mode 100644 index 0000000..33d8520 Binary files /dev/null and b/static/logos/logo_9146a060dca914df.webp differ diff --git a/static/logos/logo_9464cf10bb64e6c4.png b/static/logos/logo_9464cf10bb64e6c4.png new file mode 100644 index 0000000..3c3c14c Binary files /dev/null and b/static/logos/logo_9464cf10bb64e6c4.png differ diff --git a/static/logos/logo_9dbb955fd673993a.jpg b/static/logos/logo_9dbb955fd673993a.jpg new file mode 100644 index 0000000..7362817 Binary files /dev/null and b/static/logos/logo_9dbb955fd673993a.jpg differ diff --git a/static/logos/logo_a076ff3de1b081c4.webp b/static/logos/logo_a076ff3de1b081c4.webp new file mode 100644 index 0000000..966f9bf Binary files /dev/null and b/static/logos/logo_a076ff3de1b081c4.webp differ diff --git a/static/logos/logo_a51841603f9b4dae.webp b/static/logos/logo_a51841603f9b4dae.webp new file mode 100644 index 0000000..66ceef4 Binary files /dev/null and b/static/logos/logo_a51841603f9b4dae.webp differ diff --git a/static/logos/logo_a5dc086863a261c4.png b/static/logos/logo_a5dc086863a261c4.png new file mode 100644 index 0000000..a398a8d Binary files /dev/null and b/static/logos/logo_a5dc086863a261c4.png differ diff --git a/static/logos/logo_a95772e3b6c1bd86.png b/static/logos/logo_a95772e3b6c1bd86.png new file mode 100644 index 0000000..3d0d466 Binary files /dev/null and b/static/logos/logo_a95772e3b6c1bd86.png differ diff --git a/static/logos/logo_ba18fb1a5302ebfb.png b/static/logos/logo_ba18fb1a5302ebfb.png new file mode 100644 index 0000000..b39eaba Binary files /dev/null and b/static/logos/logo_ba18fb1a5302ebfb.png differ diff --git a/static/logos/logo_c90157612a6ae8cd.jpeg b/static/logos/logo_c90157612a6ae8cd.jpeg new file mode 100644 index 0000000..0076139 Binary files /dev/null and b/static/logos/logo_c90157612a6ae8cd.jpeg differ diff --git a/static/logos/logo_cc53b27d8bc72c42.png b/static/logos/logo_cc53b27d8bc72c42.png new file mode 100644 index 0000000..660fd76 Binary files /dev/null and b/static/logos/logo_cc53b27d8bc72c42.png differ diff --git a/static/logos/logo_d004557f16c14fab.png b/static/logos/logo_d004557f16c14fab.png new file mode 100644 index 0000000..3a5ceca Binary files /dev/null and b/static/logos/logo_d004557f16c14fab.png differ diff --git a/static/logos/logo_d222bb537ea8ccea.webp b/static/logos/logo_d222bb537ea8ccea.webp new file mode 100644 index 0000000..04a1227 Binary files /dev/null and b/static/logos/logo_d222bb537ea8ccea.webp differ diff --git a/static/logos/logo_d2913ed76e7ed261.png b/static/logos/logo_d2913ed76e7ed261.png new file mode 100644 index 0000000..65d6e12 Binary files /dev/null and b/static/logos/logo_d2913ed76e7ed261.png differ diff --git a/static/logos/logo_e1d79b4ac087b148.png b/static/logos/logo_e1d79b4ac087b148.png new file mode 100644 index 0000000..b4227c7 Binary files /dev/null and b/static/logos/logo_e1d79b4ac087b148.png differ diff --git a/static/logos/logo_e20fd6316be22ba1.jpg b/static/logos/logo_e20fd6316be22ba1.jpg new file mode 100644 index 0000000..be3a88f Binary files /dev/null and b/static/logos/logo_e20fd6316be22ba1.jpg differ diff --git a/static/logos/logo_e7e6c886f3fcb03e.png b/static/logos/logo_e7e6c886f3fcb03e.png new file mode 100644 index 0000000..3a37908 Binary files /dev/null and b/static/logos/logo_e7e6c886f3fcb03e.png differ diff --git a/static/logos/logo_e8f2688cb99c3df0.png b/static/logos/logo_e8f2688cb99c3df0.png new file mode 100644 index 0000000..182367a Binary files /dev/null and b/static/logos/logo_e8f2688cb99c3df0.png differ diff --git a/static/logos/logo_eb5c5b4571936af5.jpeg b/static/logos/logo_eb5c5b4571936af5.jpeg new file mode 100644 index 0000000..c80201e Binary files /dev/null and b/static/logos/logo_eb5c5b4571936af5.jpeg differ diff --git a/static/logos/logo_ee37fd064488f475.png b/static/logos/logo_ee37fd064488f475.png new file mode 100644 index 0000000..5f84d32 Binary files /dev/null and b/static/logos/logo_ee37fd064488f475.png differ diff --git a/static/logos/logo_efbd3cd27fb0a31e.png b/static/logos/logo_efbd3cd27fb0a31e.png new file mode 100644 index 0000000..d9922ea Binary files /dev/null and b/static/logos/logo_efbd3cd27fb0a31e.png differ diff --git a/static/logos/logo_f325651a782f4201.webp b/static/logos/logo_f325651a782f4201.webp new file mode 100644 index 0000000..f648491 Binary files /dev/null and b/static/logos/logo_f325651a782f4201.webp differ diff --git a/static/logos/logo_fa0e9407aa4d9aa5.png b/static/logos/logo_fa0e9407aa4d9aa5.png new file mode 100644 index 0000000..2617966 Binary files /dev/null and b/static/logos/logo_fa0e9407aa4d9aa5.png differ diff --git a/static/logos/logo_fb5b1867aaf4f5a0.png b/static/logos/logo_fb5b1867aaf4f5a0.png new file mode 100644 index 0000000..3e4ddc3 Binary files /dev/null and b/static/logos/logo_fb5b1867aaf4f5a0.png differ diff --git a/static/logos/logo_fellou_ai.ico b/static/logos/logo_fellou_ai.ico new file mode 100644 index 0000000..1750243 Binary files /dev/null and b/static/logos/logo_fellou_ai.ico differ diff --git a/static/logos/logo_ff45f264e6f9aff7.png b/static/logos/logo_ff45f264e6f9aff7.png new file mode 100644 index 0000000..883201d Binary files /dev/null and b/static/logos/logo_ff45f264e6f9aff7.png differ diff --git a/static/logos/logo_open_bochaai_com.ico b/static/logos/logo_open_bochaai_com.ico new file mode 100644 index 0000000..90d74de Binary files /dev/null and b/static/logos/logo_open_bochaai_com.ico differ diff --git a/static/logos/logo_openrouter_ai.png b/static/logos/logo_openrouter_ai.png new file mode 100644 index 0000000..f018028 Binary files /dev/null and b/static/logos/logo_openrouter_ai.png differ diff --git a/static/logos/logo_osfront_onesight_com.png b/static/logos/logo_osfront_onesight_com.png new file mode 100644 index 0000000..3a5ceca Binary files /dev/null and b/static/logos/logo_osfront_onesight_com.png differ diff --git a/static/logos/logo_tavily_com.png b/static/logos/logo_tavily_com.png new file mode 100644 index 0000000..bf3cdf6 Binary files /dev/null and b/static/logos/logo_tavily_com.png differ diff --git a/static/logos/logo_vip2_loli_io.png b/static/logos/logo_vip2_loli_io.png new file mode 100644 index 0000000..4f0889b Binary files /dev/null and b/static/logos/logo_vip2_loli_io.png differ diff --git a/static/logos/logo_www_waytoagi_com.ico b/static/logos/logo_www_waytoagi_com.ico new file mode 100644 index 0000000..6ec02e2 Binary files /dev/null and b/static/logos/logo_www_waytoagi_com.ico differ diff --git a/templates/admin/batch_import.html b/templates/admin/batch_import.html index b09d75c..b677b0f 100644 --- a/templates/admin/batch_import.html +++ b/templates/admin/batch_import.html @@ -3,7 +3,7 @@
-