From d84b827241fd00140c30d16081c1aa6275eff2f6 Mon Sep 17 00:00:00 2001 From: RicterZ Date: Thu, 15 Oct 2020 02:09:09 +0800 Subject: [PATCH] add default value of output dir --- nhentai/cmdline.py | 2 +- nhentai/command.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/nhentai/cmdline.py b/nhentai/cmdline.py index 519279f..2d59309 100644 --- a/nhentai/cmdline.py +++ b/nhentai/cmdline.py @@ -87,7 +87,7 @@ def cmd_parser(): choices=['recent', 'popular', 'popular-today', 'popular-week']) # download options - parser.add_option('--output', '-o', type='string', dest='output_dir', action='store', default='', + parser.add_option('--output', '-o', type='string', dest='output_dir', action='store', default='./', help='output dir') parser.add_option('--threads', '-t', type='int', dest='threads', action='store', default=5, help='thread count for downloading doujinshi') diff --git a/nhentai/command.py b/nhentai/command.py index d0fce3d..47fbc3c 100644 --- a/nhentai/command.py +++ b/nhentai/command.py @@ -94,11 +94,8 @@ def main(): elif options.is_pdf: generate_pdf(options.output_dir, doujinshi, options.rm_origin_dir) - if options.main_viewer and options.output_dir: + if options.main_viewer: generate_main_html(options.output_dir) - elif options.main_viewer: - generate_main_html() - if not platform.system() == 'Windows': logger.log(15, '🍻 All done.')