Skip to content

Commit

Permalink
Update import.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
NotaInutilis committed Nov 23, 2023
1 parent 8be9cda commit 3d5d149
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cp -a ./import/original/. ./import/modified/

# Cleanup imported sources (Same code in update.sh)
## Special cleanup for this list because of one mixed format import https://github.com/levitation-opensource/aliexpress-fake-sites/blob/main/domains.txt
find ./import/modified -type f -name "*.txt" -exec sed -ri 's/^*\.//i' {} \;
find ./import/modified -type f -name "*.txt" -exec sed -ri 's/^\*\.//i' {} \;
## Special cleanup for imported sources of other formats (AdBlock, hosts, etc.)
find ./import/modified -type f -name "*.txt" -exec sed -ri 's/^[^#[:alnum:]]/#&/; s/^0\.0\.0\.0[[:space:]]*//i' {} \;
## Normalizes URLs into domains: lowercases, remove leading spaces, protocol (`x://`) `www.` subdomains, everything after `/`, only one space before `#`. Keeps comments intact
Expand Down

0 comments on commit 3d5d149

Please sign in to comment.