Remove references to .zip files in the generator programs.
authorSteven Black <redacted>
Sun, 20 Aug 2017 16:00:19 +0000 (12:00 -0400)
committerSteven Black <redacted>
Sun, 20 Aug 2017 16:00:19 +0000 (12:00 -0400)
makeHosts.py
updateHostsFile.py
updateReadme.py

index 5b44b24538ea3cf3b38532ecc1c39c38bf510328..0e9a4c562fe210796e13457472c495431f401496 100644 (file)
@@ -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()
index 7f429ce8694305daf13b18f64832b6971329ab23..c52dee202d9a1656ba9ba79ba280e5f786154310 100644 (file)
@@ -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,
index 3507eb41bda0217befa6f51452bffff6cfb0c7de..675cf08b265955b371f7ed62a482546bc97f92a0 100644 (file)
@@ -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:
git clone https://git.99rst.org/PROJECT