Skip to content

Commit a24736e

Browse files
committed
README update
1 parent 2755b8c commit a24736e

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

README

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -88,30 +88,36 @@ file to be processed. Section starts with '[NAME]' header and followed by
8888
Encoding=UTF-8
8989

9090
Section name is a display name of hosts file to be processed. It will be used
91-
in script output. In this example, section name is 'Ad Hosts'. 'Url' variable
92-
holds a web address of hosts file. In this example, hosts file will be
93-
downloaded from 'http://foo.bar/adhosts.txt'. 'Url' variable is optional - if
94-
it is omitted, local hosts file will be processed and 'File' variable should be
95-
set accordingly. 'File' variable contains path where downloaded file will be
96-
saved or, in case of 'Url' is omitted, path to locally stored hosts file.
97-
'File' variable is optional only when 'Url' is provided: in absebse of 'File'
98-
variable, hosts filename will be deduced from Content-Disposition header or web
99-
address itself. 'File' contains relative or absolute path. Relative paths (this
100-
includes automatically deduced filenames of downloaded hosts files) are
101-
calculated relative to directory specified in HOSTS_DIR script parameter (which
102-
is current directory by default). In this example, downloaded hosts file will
103-
be saved in current directory under filename 'hosts'. By default, after script
104-
finishes processing hosts file, it deletes it. To control this behaviour 'Keep'
105-
variable is used - if it translates to True (values '1', 'yes', 'true' and
106-
'on'), file won't be deleted after being processed. If it translates to False
107-
(values '0', 'no', 'false' and 'off') or variable is omitted - default action
108-
takes place and file becomes deleted. In this example, hosts file won't be
109-
deleted after being processed. Hosts files can have wide variety of encodings.
110-
So, when reading hosts file, script uses encoding specified in Content-Type
111-
header or in current locale, if Content-Type encoding is not availabe or when
112-
hosts file is stored locally. Automatically selected hosts file encoding can be
113-
overridden with 'Encoding' variable. In this example, downloaded hosts file
114-
will be read using 'UTF-8' encoding.
91+
in script output. In this example, section name is 'Ad Hosts'.
92+
93+
'Url' variable holds a web address of hosts file. In this example, hosts file
94+
will be downloaded from 'http://foo.bar/adhosts.txt'. 'Url' variable is
95+
optional - if it is omitted, local hosts file will be processed and 'File'
96+
variable should be set accordingly.
97+
98+
'File' variable contains path where downloaded file will be saved or, in case
99+
of 'Url' is omitted, path to locally stored hosts file. 'File' variable is
100+
optional only when 'Url' is provided: in absebse of 'File' variable, hosts
101+
filename will be deduced from Content-Disposition header or web address itself.
102+
'File' contains relative or absolute path. Relative paths (this includes
103+
automatically deduced filenames of downloaded hosts files) are calculated
104+
relative to directory specified in HOSTS_DIR script parameter (which is current
105+
directory by default). In this example, downloaded hosts file will be saved in
106+
current directory under filename 'hosts'.
107+
108+
By default, after script finishes processing hosts file, it deletes it. To
109+
control this behaviour 'Keep' variable is used - if it translates to True
110+
(values '1', 'yes', 'true' and 'on'), file won't be deleted after being
111+
processed. If it translates to False (values '0', 'no', 'false' and 'off') or
112+
variable is omitted - default action takes place and file becomes deleted. In
113+
this example, hosts file won't be deleted after being processed.
114+
115+
Hosts files can have wide variety of encodings. So, when reading hosts file,
116+
script uses encoding specified in Content-Type header or in current locale, if
117+
Content-Type encoding is not availabe or when hosts file is stored locally.
118+
Automatically selected hosts file encoding can be overridden with 'Encoding'
119+
variable. In this example, downloaded hosts file will be read using 'UTF-8'
120+
encoding.
115121

116122
6. Usage example
117123
----------------

0 commit comments

Comments
 (0)