From: Steven Black Date: Sun, 20 Aug 2017 16:00:19 +0000 (-0400) Subject: Remove references to .zip files in the generator programs. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=68dcf5c12586c59aa3689bf958a51be29a8ad748;p=stevenblack-hosts.git Remove references to .zip files in the generator programs. --- diff --git a/makeHosts.py b/makeHosts.py index 5b44b2453..0e9a4c562 100644 --- a/makeHosts.py +++ b/makeHosts.py @@ -59,56 +59,56 @@ def main(): "data subfolders.") parser.parse_args() - update_hosts_file("-a", "-z", "-o", + update_hosts_file("-a", "-o", "alternates/gambling", "-e", "gambling") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/porn", "-e", "porn") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/social", "-e", "social") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/fakenews", "-e", "fakenews") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/fakenews-gambling", "-e", "fakenews", "gambling") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/fakenews-porn", "-e", "fakenews", "porn") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/fakenews-social", "-e", "fakenews", "social") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/gambling-porn", "-e", "gambling", "porn") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/gambling-social", "-e", "gambling", "social") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/porn-social", "-e", "porn", "social") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/fakenews-gambling-porn", "-e", "fakenews", "gambling", "porn") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/fakenews-gambling-social", "-e", "fakenews", "gambling", "social") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/fakenews-porn-social", "-e", "fakenews", "porn", "social") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/gambling-porn-social", "-e", "gambling", "porn", "social") - update_hosts_file("-a", "-z", "-n", "-o", + update_hosts_file("-a", "-n", "-o", "alternates/fakenews-gambling-porn-social", "-e", "fakenews", "gambling", "porn", "social") - update_hosts_file("-a", "-z", "-n") + update_hosts_file("-a", "-n") # Update the readme files. update_readme_file() diff --git a/updateHostsFile.py b/updateHostsFile.py index 7f429ce86..c52dee202 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -23,7 +23,6 @@ import fnmatch import argparse import socket import json -import zipfile # Detecting Python 3 for version-dependent implementations PY3 = sys.version_info >= (3, 0) @@ -66,7 +65,6 @@ def get_defaults(): "outputsubfolder": "", "hostfilename": "hosts", "targetip": "0.0.0.0", - "ziphosts": False, "sourcedatafilename": "update.json", "sourcesdata": [], "readmefilename": "readme.md", @@ -102,10 +100,6 @@ def main(): parser.add_argument("--keepdomaincomments", "-k", dest="keepdomaincomments", default=False, help="Keep domain line comments.") - parser.add_argument("--zip", "-z", dest="ziphosts", default=False, - action="store_true", help="Additionally create " - "a zip archive of the " - "hosts file.") parser.add_argument("--noupdate", "-n", dest="noupdate", default=False, action="store_true", help="Don't update from " "host data sources.") @@ -182,13 +176,6 @@ def main(): skipstatichosts=skip_static_hosts) final_file.close() - if settings["ziphosts"]: - zf = zipfile.ZipFile(path_join_robust(output_subfolder, - "hosts.zip"), mode='w') - zf.write(path_join_robust(output_subfolder, "hosts"), - compress_type=zipfile.ZIP_DEFLATED, arcname='hosts') - zf.close() - update_readme_data(settings["readmedatafilename"], extensions=extensions, numberofrules=number_of_rules, diff --git a/updateReadme.py b/updateReadme.py index 3507eb41b..675cf08b2 100644 --- a/updateReadme.py +++ b/updateReadme.py @@ -27,8 +27,6 @@ def main(): 'hosts/blob/master/${location}readme.md) | ' '[link](https://raw.githubusercontent.com/StevenBlack/' 'hosts/master/${location}hosts) | [link]' - '(https://raw.githubusercontent.com/StevenBlack/hosts/' - 'master/${location}hosts.zip) | ${fmtentries} | ' '[link](http://sbc.io/hosts/${location}hosts)') with open(README_DATA_FILENAME, 'r') as f: