Ultimate-Hosts-Blacklist / whitelist

The whitelist of the Ultimate Hosts Blacklist project, infrastructure and beyond.
MIT License
50 stars 13 forks source link

Script: Feature request import lists throught URI #150

Closed spirillen closed 4 years ago

spirillen commented 4 years ago

I would like to suggest the ability to use URI as lists sources as that currently seems unsupported.

Example: https://travis-ci.com/github/dns-test/porn.host.rpz/builds/181092669#L2715

Here is my script example trying to uses the URI for as sources for --reg and --all

WhiteListing () {
    hash uhb_whitelist
    mv "${testFile}" "${testFile}.tmp.txt"

    uhb_whitelist --hierachical-sorting -wc -m -w "${WhiteList}" \
      --all 'https://raw.githubusercontent.com/mypdns/matrix/master/source/whitelist/domain.list' \
      --reg 'https://raw.githubusercontent.com/mypdns/matrix/master/source/whitelist/wildcard.list' \
      -f "${testFile}.tmp.txt" -o "${testFile}"

    rm "${testFile}.tmp.txt"
}

The reason I would like to suggest this is, it would save a some processes by first importing the lists as I have been done like this

getWhiteList () {
    wget -qO- 'https://raw.githubusercontent.com/mypdns/matrix/master/source/whitelist/domain.list' \
    | awk '{ printf("%s\n",tolower($1)) }' >> "${WhiteList}"
    wget -qO- 'https://raw.githubusercontent.com/mypdns/matrix/master/source/whitelist/wildcard.list' \
    | awk '{ printf("ALL %s\n",tolower($1)) }' >> "${WhiteList}"
    sort -u -f "${WhiteList}" -o "${WhiteList}"
}

This has some relation to <Ultimate-Hosts-Blacklist/whitelist-tool#1>

funilrys commented 4 years ago

Waiting for CI/CD: https://travis-ci.org/github/Ultimate-Hosts-Blacklist/whitelist/builds/721772785