chore: v6.6.6 版本迭代更新
主要变更: 1. 重构"国学"相关模块为"经典名句",统一命名规范 2. 重命名"阅读报告"为"使用报告",调整相关文案与配置 3. 修复iOS模拟器图片缓存兼容问题,优化图表渲染逻辑 4. 新增设备活跃状态前端兜底判断,修复在线计数异常 5. 完善登录/注册流程,新增忘记密码路由与账户编辑提示 6. 优化文件传输与字体导入逻辑,废弃过时的bytes属性使用 7. 添加Spotlight全局快捷键支持,更新隐私权限与通知配置 8. 补充数据库迁移脚本与部署文档,修复后端接口兼容问题 9. 调整部分UI交互细节,优化内存占用与应用稳定性
This commit is contained in:
41
scripts/upload_agreements.py
Normal file
41
scripts/upload_agreements.py
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
"""上传协议文件到服务器"""
|
||||
import paramiko
|
||||
import os
|
||||
import glob
|
||||
|
||||
HOST = '123.207.67.197'
|
||||
PORT = 22
|
||||
USER = 'root'
|
||||
PASS = '520Kiss123'
|
||||
REMOTE_DIR = '/www/wwwroot/tools.wktyl.com/public/agreements/'
|
||||
LOCAL_DIR = os.path.join(os.path.dirname(__file__), '..', 'docs', 'toolsapi', 'public', 'agreements')
|
||||
|
||||
def main():
|
||||
local_dir = os.path.abspath(LOCAL_DIR)
|
||||
html_files = glob.glob(os.path.join(local_dir, '*.html'))
|
||||
print(f"找到 {len(html_files)} 个协议文件待上传")
|
||||
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect(HOST, port=PORT, username=USER, password=PASS, timeout=15)
|
||||
sftp = ssh.open_sftp()
|
||||
|
||||
# 确保远程目录存在
|
||||
try:
|
||||
sftp.stat(REMOTE_DIR)
|
||||
except FileNotFoundError:
|
||||
sftp.mkdir(REMOTE_DIR)
|
||||
|
||||
for f in html_files:
|
||||
fname = os.path.basename(f)
|
||||
remote_path = REMOTE_DIR + fname
|
||||
print(f" 上传: {fname} -> {remote_path}")
|
||||
sftp.put(f, remote_path)
|
||||
|
||||
sftp.close()
|
||||
ssh.close()
|
||||
print(f"✅ 全部 {len(html_files)} 个文件上传完成")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user