1 Star 0 Fork 0

Sync.Nep / djc_helper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
const.py 995 Bytes
一键复制 编辑 原始数据 按行查看 历史
import os
# 一些常数
appVersion = 149
sVersionName = "v4.7.3.0"
guanjia_skey_version = 2
tmp_path = "/tmp/"
def get_final_dir_path(current_dir: str) -> str:
if os.getenv("TENCENTCLOUD_RUNENV") is not None and not current_dir.startswith(tmp_path):
# 腾讯云函数运行环境下仅/tmp目录可写
return tmp_path + current_dir
return current_dir
# 不同版本的db目录
# key_md5[0:3]/key_md5
db_top_dir_v1 = get_final_dir_path(".db")
# key_md5[0:2]/key_md5[2:4]/key_md5
db_top_dir_v2 = get_final_dir_path(".db_v2")
# 定义一些目录
db_top_dir = db_top_dir_v2
cached_dir = get_final_dir_path(".cached")
downloads_dir = f"{cached_dir}/downloads"
compressed_temp_dir = f"{cached_dir}/compressed"
# 确保上面定义的这些目录都存在
directory_list = [v for k, v in locals().items() if k.endswith("_dir")]
for directory in directory_list:
os.makedirs(directory, exist_ok=True)
# vscode 在线版
vscode_online_url = "https://vscode.dev/"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/a915646637/djc_helper.git
git@gitee.com:a915646637/djc_helper.git
a915646637
djc_helper
djc_helper
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891