MCPcopy Create free account

hub / github.com/Cats-Team/AdRules / functions

Functions23 in github.com/Cats-Team/AdRules

↓ 7 callersFunctionlog_info
输出格式: [INFO] YYYY-MM-DD HH:MM:SS - 消息内容
script/remove.py:10
↓ 4 callersFunctionlog
格式化日志输出
script/sort.py:5
↓ 3 callersMethod_valid_hostname
Checks if hostname is valid. Imitates tldts logic with standard lib.
script/compressor.py:74
↓ 2 callersMethodis_comment
(line: str)
script/compressor.py:71
↓ 2 callersFunctionread_file
读取文件并返回行列表
script/utils.py:6
↓ 1 callersMethod_valid_adblock
(self, rule: str)
script/compressor.py:104
↓ 1 callersMethod_valid_etc_hosts
(self, rule: str)
script/compressor.py:94
↓ 1 callersFunctionclean_blacklist
(blacklist_path, plain_wl, regex_wl)
script/remove.py:67
↓ 1 callersFunctioncompress_rules
Compress validated rules.
script/compressor.py:242
↓ 1 callersFunctionformat_bj_time
格式化北京时间
script/utils.py:34
↓ 1 callersFunctiongenerate_singbox
(input_path, output_path)
script/dns_generator.py:7
↓ 1 callersFunctiongenerate_surge
(input_path, output_path)
script/dns_generator.py:17
↓ 1 callersFunctionget_args
()
script/remove.py:21
↓ 1 callersFunctionget_bj_time
获取北京时间
script/utils.py:29
↓ 1 callersFunctionis_regex
判断字符串是否包含正则表达式的特殊字符
script/remove.py:27
↓ 1 callersMethodis_valid
(self, rule: str)
script/compressor.py:168
↓ 1 callersFunctionload_whitelist
(file_path)
script/remove.py:36
↓ 1 callersFunctionmain
()
script/compressor.py:306
↓ 1 callersFunctionparse_rule
Convert raw text to AdblockRule objects.
script/compressor.py:202
↓ 1 callersFunctionprocess_rule
(file_path)
script/sort.py:10
↓ 1 callersMethodvalidate
Main validation loop (Backwards iteration). Returns: (valid_rules, removed_lines_for_logging)
script/compressor.py:175
↓ 1 callersFunctionwrite_file
将行列表写入文件
script/utils.py:20
Method__init__
(self, allow_ip: bool = False)
script/compressor.py:66