mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-07-01 02:36:52 +00:00
Remove references to .zip files in the generator programs.
This commit is contained in:
32
makeHosts.py
32
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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user