diff options
| author | UltraQbik <no1skill@yandex.ru> | 2024-08-30 20:03:59 +0300 |
|---|---|---|
| committer | UltraQbik <no1skill@yandex.ru> | 2024-08-30 20:03:59 +0300 |
| commit | 38030e9d3930fb25ee422ac6061a3d6f58b05324 (patch) | |
| tree | c652804c18b3f98cc2298cd51bea83a76f743b92 /main.py | |
| parent | 9d618baeafd73ef4ea1d6a2ec90d87f63bb8908c (diff) | |
| download | httpy-38030e9d3930fb25ee422ac6061a3d6f58b05324.tar.gz httpy-38030e9d3930fb25ee422ac6061a3d6f58b05324.zip | |
Update argparse
Renamed --dont-compress-path to --compress-path Moved compressed path prefix to config.py
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/main.py b/main.py index 60bb023..360bb2b 100644 --- a/main.py +++ b/main.py @@ -51,13 +51,10 @@ _parser.add_argument("-c", "--cert", _parser.add_argument("-k", "--priv-key", help="private key", required=True) -_parser.add_argument("--dont-compress-path", - help="disables pre-compression of files in 'www' folder (default True)", - default=False, +_parser.add_argument("--compress-path", + help="enables pre-compression of files in 'www' folder (default True)", + default=True, action="store_true") -_parser.add_argument("--compressed-path", - help="path where compressed directory will be stored (default 'compress')", - default="compress") _parser.add_argument("--disable-ssl", help="SSL for HTTPs encrypted connection (default True)", default=False, @@ -329,10 +326,10 @@ class HTTPServer: def main(): path_map = file_man.generate_path_map(verbose=ARGS.verbose) - if not ARGS.dont_compress_path: + if ARGS.compress_path: path_map = file_man.compress_path_map( path_map, - path_prefix=ARGS.compressed_path, + path_prefix=FILE_MAN_COMPRESSED_PATH, regen=True, verbose=ARGS.verbose) |