How stevenblack/hosts works
This repository aggregates curated domain blocklists into hosts files, with optional category extensions and many prebuilt combinations. The user-facing workflow is to run the generator, which updates and combines source data into a hosts file; makeHosts.py also builds extension variants and invokes README generation. The excerpts show orchestration and selected fetch, filtering, and output behavior, but not every implementation detail, so several internal transitions are omitted rather than inferred.
Main entry points: updateHostsFile.py Hosts generator · makeHosts.py Build orchestrator · updateReadme.py README renderer · data Curated source lists
Components 16
Generation orchestration
- Build orchestrator
makeHosts.py - Hosts generator
updateHostsFile.py - README renderer
updateReadme.py
Source inputs
- Curated source lists
data - Category lists
extensions
Hosts processing
- Fetch and transform
updateHostsFile.py - Domain exclusions
updateHostsFile.py - Normalize and deduplicate
updateHostsFile.py
Published variants
- Generated hosts files
hosts - Extension variants
alternates - Variant metadata
readmeData.json - Variant READMEs
readme_template.md
Other components
- Repository operator
- Upstream blocklists
- HTTP sources
- System hosts file
Connections 16
- Repository operator → Build orchestrator: runs
- Build orchestrator → Hosts generator: invokes
makeHosts.py - Build orchestrator → README renderer: invokes
makeHosts.py - Hosts generator → Curated source lists: aggregates sources
readme.md - Hosts generator → Category lists: selects categories
readme.md - Hosts generator → Fetch and transform: updates sources
updateHostsFile.py - Fetch and transform → HTTP sources: requests data
updateHostsFile.py - Upstream blocklists → Curated source lists: contributes lists
readme.md - Hosts generator → Domain exclusions: collects exclusions
updateHostsFile.py - Hosts generator → Normalize and deduplicate: builds merged file
updateHostsFile.py - Hosts generator → Generated hosts files: generates variants
readme.md - Hosts generator → Variant metadata: updates metadata
updateHostsFile.py - README renderer → Variant metadata: reads variant data
updateReadme.py - README renderer → Variant READMEs: renders
updateReadme.py - Build orchestrator → Extension variants: generates combinations
makeHosts.py - Hosts generator → System hosts file: installs hosts file