From 733c189191d742fbc963b7fdca7b29a9f2cb6e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 18 Sep 2022 09:15:52 +0200 Subject: [PATCH 1/4] Fix codespell errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .codespellignore | 1 + .github/workflows/codespell.yml | 1 + README.md | 2 +- pihole_adlist_tool | 6 +++--- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .codespellignore diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 0000000..d6744d0 --- /dev/null +++ b/.codespellignore @@ -0,0 +1 @@ +ro diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 8c38ef2..be1403a 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -24,3 +24,4 @@ jobs: with: check_filenames: true check_hidden: true + ignore_words_file: .codespellignore diff --git a/README.md b/README.md index 1260c0b..8ccf314 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The final output is a table of all your adlists with the corresponding number of - adlist table id, status, total domains on adlist, covered domains, hits, unique covered domains, address - the sum of unique covered domains -- optional: list of unique coverd domains with adlist_id, address +- optional: list of unique covered domains with adlist_id, address - optional: analyse regex blacklist (will be disabled when running Pi-hole in Docker Container!) As domains usually appear on more then one adlist I introduce the concept of ***unique covered domains***. Those are domains that have been visited, would have been blocked and appear on just one adlist. This might help you to value your adlists not just by how many domains are covered but also what would happen if you disable this adlist. diff --git a/pihole_adlist_tool b/pihole_adlist_tool index bcab713..c4a4826 100755 --- a/pihole_adlist_tool +++ b/pihole_adlist_tool @@ -952,7 +952,7 @@ if [ "$REGEX_MODE" -eq 1 ]; # table regex_black contains all blacklisted RegEx from gravity.db # table all_domains contains all domains (in the selected time period) from the pihole-FTL.db (including domains from CNAME inspection) # table domain_by_regex contains all domains and the blocking RegEx -# table domainlist_regex contains all exact domains that are on the personal black/whitelist and coverd by RegEx as well +# table domainlist_regex contains all exact domains that are on the personal black/whitelist and covered by RegEx as well # 1.) copy blacklisted RegEx info from gravity database # 2.) copy distinct domains from pihole-FTL.db @@ -1025,7 +1025,7 @@ EOF # the number of different domains that would have been blocked by RegEx with the current RegEx configuration sqlite $TEMP_DB "INSERT INTO info (property, value) Select 'NUM_DOMAINS_BLOCKED_BY_REGEX', COUNT (distinct domain) FROM domain_by_regex JOIN regex_black ON regex_id=id where enabled=1 ;" - # the number of domainlist domains coverd by RegEx + # the number of domainlist domains covered by RegEx sqlite $TEMP_DB "INSERT INTO info (property, value) Select 'DOMAINLIST_REGEX', COUNT(distinct domain) FROM domainlist_regex;" NUM_ALL_DOMAINS=$(sqlite $TEMP_DB "SELECT value FROM info where property='NUM_ALL_DOMAINS';") @@ -1056,7 +1056,7 @@ EOF echo echo echo " [i] ${bold}You hit a special case${normal}" - echo " Your personal domainlist (black- and whitelist) contains at least one domain that is also coverd by at least" + echo " Your personal domainlist (black- and whitelist) contains at least one domain that is also covered by at least" echo " one of your RegEx (black- and whitelist)" echo echo From 8b0be7a96c840153f4359caed611d448e44fde3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 18 Sep 2022 09:17:13 +0200 Subject: [PATCH 2/4] Bump version to v2.6.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- pihole_adlist_tool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pihole_adlist_tool b/pihole_adlist_tool index c4a4826..30dc780 100755 --- a/pihole_adlist_tool +++ b/pihole_adlist_tool @@ -1,6 +1,6 @@ #!/bin/bash -PIHOLE_ADLIST_TOOL_VERSION="2.6.2" +PIHOLE_ADLIST_TOOL_VERSION="2.6.3" # define path to pihole's databases and temporary database TEMP_DB="/tmp/temp.db" From 9e03e09822c746374d61a5a70ee533e72aafcfea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 1 Oct 2022 16:41:34 +0200 Subject: [PATCH 3/4] Set dependabot target branch to development MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .github/dependabot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index df412cc..fc3c226 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,4 @@ updates: interval: weekly day: saturday time: "10:00" + target-branch: development From 79032b6cf2d9120e5a56f3d41e3ef2d538f26927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 8 Oct 2022 13:49:41 +0200 Subject: [PATCH 4/4] Update usage text in readme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8ccf314..90454a1 100644 --- a/README.md +++ b/README.md @@ -64,15 +64,22 @@ On my [NanoPi NeoPlus2](http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO_Pl ```bash pihole_adlist_tool [options] -options: - -d [Num] Consider the last [Num] days (Default: 30). Enter 0 for all-time analysis. - -t [Num] Show top blocked domains. [Num] defines the number to show. - -s [total/domains/hits/unique] Set sorting order to total domains, domains covered, hits covered or unique covered domains DESC. (Default sorting: id ASC) - -u Show covered unique domains - -a Run in 'automatic mode'. No user input is required at all, assuming default choice would be to leave everything untouched. -le_adlist_tool's version. - -h Show this help dialog +Options: + -d [Num] Consider the last [Num] days (Default: 30). Enter 0 for all-time analysis. + -t [Num] Show top blocked domains. [Num] defines the number to show. + + -s [total/covered/hits/unique] Set sorting order to total (total domains) covered (domains covered), hits (hits covered) or unique (covered unique domains) DESC. (Default sorting: id ASC). + + -u Show covered unique domains. + + -a Run in 'automatic mode'. No user input is required at all, assuming default choice would be to leave everything untouched. + + -r Analyse RegEx as well. Depending on the amount of domains and RegEx this might take a while. Please note: Can only be used, if Pi-hole is NOT running in a Docker Container! + + -v Display pihole_adlist_tool's version. + + -h Show this help dialog. ``` ---