zhenxun_bot/zhenxun/builtin_plugins/plugin_store/config.py

28 lines
796 B
Python
Raw Normal View History

import re
2024-08-20 21:29:42 +08:00
from pathlib import Path
BASE_PATH = Path() / "zhenxun"
BASE_PATH.mkdir(parents=True, exist_ok=True)
DEFAULT_GITHUB_URL = "https://github.com/zhenxun-org/zhenxun_bot_plugins/tree/main"
2024-09-03 13:04:49 +08:00
"""伴生插件github仓库地址"""
EXTRA_GITHUB_URL = "https://github.com/zhenxun-org/zhenxun_bot_plugins_index/tree/index"
"""插件库索引github仓库地址"""
GITHUB_REPO_URL_PATTERN = re.compile(
r"^https://github.com/(?P<owner>[^/]+)/(?P<repo>[^/]+)(/tree/(?P<branch>[^/]+))?$"
)
"""github仓库地址正则"""
JSD_PACKAGE_API_FORMAT = (
"https://data.jsdelivr.com/v1/packages/gh/{owner}/{repo}@{branch}"
2024-08-20 21:29:42 +08:00
)
"""jsdelivr包地址格式"""
2024-09-03 15:43:09 +08:00
GIT_API_TREES_FORMAT = (
"https://api.github.com/repos/{owner}/{repo}/git/trees/{branch}?recursive=1"
)
"""git api trees地址格式"""