Skip to content

Commit

Permalink
style: format
Browse files Browse the repository at this point in the history
  • Loading branch information
everdrone committed Oct 2, 2023
1 parent d1c584b commit 1274b30
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions nts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,26 @@ def main():

usage = "Usage: %prog [options] args"
parser = OptionParser(usage=usage)
parser.add_option("-o", "--out-dir", dest="output_directory", default=download_dir, action="store", type="string",
help="where the files will be downloaded, defaults to ~/Downloads on macOS and %USERPROFILE%\\Downloads", metavar="DIR")
parser.add_option("-v", "--version", default=False,
dest="version", action="store_true",
parser.add_option(
"-o",
"--out-dir",
dest="output_directory",
default=download_dir,
action="store",
type="string",
help="where the files will be downloaded, defaults to ~/Downloads on macOS and %USERPROFILE%\\Downloads",
metavar="DIR")
parser.add_option("-v",
"--version",
default=False,
dest="version",
action="store_true",
help="print the version number and quit")
parser.add_option("-q", "--quiet", default=False,
dest="quiet", action="store_true",
parser.add_option("-q",
"--quiet",
default=False,
dest="quiet",
action="store_true",
help="only print errors")

(options, args) = parser.parse_args()
Expand All @@ -49,7 +62,8 @@ def url_matcher(url):
match_sh = re.match(show_regex, url)

if match_ep:
nts.download(url=url, quiet=options.quiet,
nts.download(url=url,
quiet=options.quiet,
save_dir=download_dir)
elif match_sh:
episodes = nts.get_episodes_of_show(match_sh.group(1))
Expand Down

0 comments on commit 1274b30

Please sign in to comment.