domains-import
importDownloads the Public Suffix List and writes data/public-suffix-list.txt, the list the crate embeds.
cargo run -p utopia-domains --bin domains-importEach rule keeps its section (ICANN, PRIVATE, or - for a rule outside
both) and the // comment lines just above it. The task fails without
writing when the list cannot be downloaded or has no com rule. Rebuild
the crate afterwards: the list is embedded at compile time.
Arguments
none: the task takes no arguments.
Environment
UTOPIA_DOMAINS_PSL_URLwhere to download the list from (default https://publicsuffix.org/list/public_suffix_list.dat).
UTOPIA_DOMAINS_DATA_DIRthe directory to write public-suffix-list.txt to (default: the crate's data/).
Exit codes
0the list was written.
1the list could not be downloaded, is corrupt (no com rule), is not UTF-8, or could not be written; the reason is on standard error.
Writes
crates/utopia/domains/data/public-suffix-list.txt
The crate embeds these files when it is compiled: rebuild after running the task.