From 00397a63b84af7d144780ab4fca32ead2512c6fc Mon Sep 17 00:00:00 2001 From: Jowe <123822645+Selei1983@users.noreply.github.com> Date: Tue, 30 Dec 2025 21:40:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20v2.1.0=E8=A1=A5=E5=85=85=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=20-=20=E9=85=8D=E7=BD=AE=E5=AE=8C=E5=96=84=E5=92=8C?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复内容: - 完善tag_generator.py的generate_description方法 - 优化index_new.html首页图标CSS - 更新templates/admin登录页面和后台模板 - 完善config.py配置 - 更新requirements.txt依赖列表 - 优化.gitignore规则 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- .claude/settings.local.json | 10 ++- .gitignore | 8 ++ config.py | 4 + init_db.py | 3 + requirements.txt | 3 + templates/admin/master.html | 6 ++ templates/admin_login.html | 142 ++++++++++++++++++++++----------- templates/index_new.html | 154 ++++++++++++++++++++++++++++++------ utils/tag_generator.py | 135 +++++++++++++++++++++++++++++++ 9 files changed, 393 insertions(+), 72 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 679435b..2a4bf4e 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -20,7 +20,15 @@ "Bash(git commit:*)", "Bash(curl:*)", "WebFetch(domain:zjpb.net)", - "Bash(del import_bookmarks.py test_bookmark_parse.py test_simple_parse.py result.txt)" + "Bash(del import_bookmarks.py test_bookmark_parse.py test_simple_parse.py result.txt)", + "Bash(git tag:*)", + "Bash(if [ -f .env ])", + "Bash(then echo \"exists\")", + "Bash(else echo \"not exists\")", + "Bash(timeout /t 3 /nobreak)", + "Bash(ping:*)", + "Bash(git diff-tree:*)", + "Bash(git format-patch:*)" ] } } diff --git a/.gitignore b/.gitignore index 037ea8f..f5d6ed0 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,8 @@ instance/ # 环境变量 .env .env.local +.env.production +.env.*.local # 数据库 *.db @@ -58,6 +60,12 @@ Thumbs.db static/uploads/* !static/uploads/.gitkeep +# 导出文件 +urls.txt +sites_export.csv +backup_*.sql +*.sql + # 临时文件 *.tmp *.bak diff --git a/config.py b/config.py index a604c05..9cde07b 100644 --- a/config.py +++ b/config.py @@ -42,6 +42,10 @@ class Config: 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' + class DevelopmentConfig(Config): """开发环境配置""" DEBUG = True diff --git a/init_db.py b/init_db.py index 1cf8e07..23f0c9b 100644 --- a/init_db.py +++ b/init_db.py @@ -62,6 +62,7 @@ def init_database(): print("\n正在创建示例网站...") sites_data = [ { + 'code': '10001001', 'name': 'ChatGPT', 'url': 'https://chat.openai.com', 'slug': 'chatgpt', @@ -72,6 +73,7 @@ def init_database(): 'sort_order': 100 }, { + 'code': '10001002', 'name': 'Midjourney', 'url': 'https://www.midjourney.com', 'slug': 'midjourney', @@ -82,6 +84,7 @@ def init_database(): 'sort_order': 95 }, { + 'code': '10001003', 'name': 'GitHub Copilot', 'url': 'https://github.com/features/copilot', 'slug': 'github-copilot', diff --git a/requirements.txt b/requirements.txt index 844b4ab..7b61952 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,3 +11,6 @@ requests==2.31.0 beautifulsoup4==4.12.2 Pillow>=10.2.0 openai>=1.0.0 +gunicorn==21.2.0 +pypinyin==0.51.0 +markdown==3.5.1 diff --git a/templates/admin/master.html b/templates/admin/master.html index e499e4a..47ca379 100644 --- a/templates/admin/master.html +++ b/templates/admin/master.html @@ -85,6 +85,12 @@ 批量导入 +