2024-09-02 01:50:39 +08:00
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
2024-09-02 01:50:39 +08:00
|
|
|
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仓库地址"""
|
2024-09-02 01:50:39 +08:00
|
|
|
|
|
|
|
|
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
|
|
|
)
|
2024-09-02 01:50:39 +08:00
|
|
|
"""jsdelivr包地址格式"""
|