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 @@ +
输入您的登录凭据以访问后台管理系统
+输入您的登录凭据以访问后台管理系统
{{ message }}
+{{ message }}