pyhostspatcher Wiki
Status: Beta
Brought to you by:
genzj
::html
pyhostspatch.py [-h] [-n] [-b BACKUP] [--restore RESTORE] [-d]
[-c {on,off}] [-#]
[HOST_DIFF_FILE]
::html
HOST_DIFF_FILE Diff file to be adopted to hosts file.
::html
-h, --help show this help message and exit
-n, --dry Run and write to stdout, will not touch the hosts
file.
-b BACKUP, --backup BACKUP
Specify name of backup file. By default hosts file
will be backup to backup_yymmdd_HHMMSS in the same
folder of this program.
--restore RESTORE
Restore from a specified backup file. Before
overwriting current hosts file, another backup, name
of which can be also assigned by --backup argument,
will be saved.
-d, --debug
Log debug information.
-c {on,off}, --confirm {on,off}
Ask user to confirm critical operations. Activated by
default.
-#, --comment
Comment (add a # at the beginning of line) instead of
removing when delete lines. Since backup files will be
kept before writing hosts file, and too many comments
lines is really unfriendly for further manually
maintenance, you really do not have to do this.