MCPcopy Create free account
hub / github.com/CCSH/IPTV / get_project_dirs

Function get_project_dirs

main.py:28–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27# ===================== 通用工具函数 =====================
28def get_project_dirs() -> dict:
29 script_abspath = os.path.abspath(__file__)
30 root_dir = os.path.dirname(script_abspath)
31 return {
32 "root": root_dir,
33 "blacklist_auto": os.path.join(root_dir, "assets/whitelist-blacklist/blacklist_auto.txt"),
34 "whitelist_respotime": os.path.join(root_dir, "assets/whitelist-blacklist/whitelist_respotime.txt"),
35 "blacklist_manual": os.path.join(root_dir, "assets/whitelist-blacklist/blacklist_manual.txt"),
36 "whitelist_manual": os.path.join(root_dir, "assets/whitelist-blacklist/whitelist_manual.txt"),
37 "corrections_name": os.path.join(root_dir, "assets/corrections_name.txt"),
38 "urls": os.path.join(root_dir, "assets/urls.txt"),
39 "main_channel": os.path.join(root_dir, "主频道"),
40 "local_channel": os.path.join(root_dir, "地方台")
41 }
42
43def read_txt(file_path: str, strip: bool = True, skip_empty: bool = True) -> list:
44 try:

Callers 1

main.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected