Updated the documentation with the new compress option.
authorStefano <redacted>
Tue, 2 Jan 2018 09:51:26 +0000 (10:51 +0100)
committerStefano <redacted>
Tue, 2 Jan 2018 09:51:26 +0000 (10:51 +0100)
Removed a redundant skipstatichosts option.

readme_template.md
updateHostsFile.py

index 04cb4d032bd8b1d645f0ff33bffd87ae3a362272..6538c3f25ae9853ad30066e94954dca0572d2044 100644 (file)
@@ -93,8 +93,6 @@ target.  Default is `0.0.0.0`.
 that appear on the same line as domains.  The default is `false` since some
 router-based implementations can't handle comments in-line with hosts.
 
-`--skipstatichosts`, or `-s`: `false` (default) or `true`,
-
 `--noupdate`, or `-n`: skip fetching updates from hosts data sources.
 
 `--output <subfolder>`, or `-o <subfolder>`: place the generated source file
@@ -106,6 +104,11 @@ in a subfolder.  If the subfolder does not exist, it will be created.
 section at the top, containing lines like `127.0.0.1 localhost`.  This is
 useful for configuring proximate DNS services on the local network.
 
+`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file 
+ignoring non-necessary lines (empty lines and comments) and putting multiple 
+domains in each line. Reducing the number of lines of the hosts file improves 
+the performances under Windows (with DNS Client service enabled).
+
 ## How do I control which sources are unified?
 
 Add one or more  *additional* sources, each in a subfolder of the `data/`
index 6ee62903a6bfa9b006ef33e1fbdd0088be1849ab..23b95174347e471a82f83ad57624897b5abbbdbc 100644 (file)
@@ -122,9 +122,10 @@ def main():
                         default=False, action="store_true",
                         help="Compress the hosts file "
                              "ignoring non-necessary lines "
-                             "(empty lines and comments)."
-                             "Improve the performances "
-                             "under Windows.")
+                             "(empty lines and comments) and "
+                             "putting multiple domains in "
+                             "each line. Improve the "
+                             "performances under Windows.")
 
     global settings
 
@@ -670,7 +671,7 @@ def compress_file(input_file, target_ip, output_file):
     lines_index = 0
     for line in input_file.readlines():
         line = line.decode("UTF-8")
-        if line.startswith('#') or line.startswith('\n'):
+        if line.startswith(('#', '\n')):
             continue
 
         if line.startswith(target_ip):
git clone https://git.99rst.org/PROJECT