$ show blocklistproject/Lists
This repository is a curated DNS blocklist project providing domain lists for categories like ads, malware, phishing, tracking, and more. It is primarily a data resource, but includes a sophisticated Python-based build pipeline, automated issue triage, upstream monitoring, and CI/CD workflows. The codebase is config-driven, with reusable modules for domain normalization, validation, format conversion, and merging. The project outputs lists in multiple formats (hosts, AdGuard, dnsmasq, plain domains) and is designed for integration with Pi-hole, AdGuard Home, and similar tools. While the domain lists are the primary artifact, the supporting infrastructure demonstrates strong data engineering practices, including automated testing, structured logging, and exception handling. The repository has a large issue backlog but active maintenance with frequent commits and automated workflows.
The LLM identified 4 files worth highlighting for reuse:
Provides functions to parse domain entries from hosts, AdGuard, dnsmasq, and plain domain formats into a canonical domain set. The normalize_line() function handles all formats with regex, and normalize_file() yields domains. This is a reusable pattern for any project that needs to ingest blocklists from diverse sources.
Implements a validation framework for domains with toggleable checks: syntax, TLD existence, critical domain protection, and false positive detection. validate_domain_set() returns valid and error sets. The design allows easy addition of new checks and is reusable for any domain validation pipeline.
Uses a FORMATTERS dictionary to map format names to output functions, with format_output() dispatching to the correct generator. Each formatter produces headers and domain lines in the target syntax. This pattern is reusable for any project that needs to generate multiple output formats from a single data source.
Fetches domain lists from 14+ upstream sources, normalizes them, compares with current lists, and creates GitHub pull requests for changes. Supports trust levels, auto-merge thresholds, and caching. This is a reusable pattern for any project that aggregates data from external sources and needs automated update workflows.