flake8 clean up

This commit is contained in:
Eddy Hintze
2020-01-19 09:40:41 -05:00
parent e6817cc1de
commit 6fa1a54228
5 changed files with 94 additions and 32 deletions

View File

@@ -19,27 +19,40 @@ def cli():
###
# Generate cookie
###
parser_gencookie = subparsers.add_parser('gen-cookie',
help="Generate cookie used to access your library")
parser_gencookie.add_argument('-c', '--cookie-file', type=str,
help='Location of the file to store the cookie',
default='hbd-cookies.txt')
parser_gencookie = subparsers.add_parser(
'gen-cookie',
help="Generate cookie used to access your library",
)
parser_gencookie.add_argument(
'-c', '--cookie-file', type=str,
help="Location of the file to store the cookie",
default="hbd-cookies.txt",
)
###
# Download Library
###
# TODO: for download: have option to only get types, ebooks, videos, etc do not enforce,
# but lower and just string match to the type in the api
parser_download = subparsers.add_parser('download',
help="Download content in your humble bundle library")
parser_download.add_argument('-c', '--cookie-file', type=str,
help='Location of the file to store the cookie',
default='hbd-cookies.txt')
parser_download.add_argument('-l', '--library-path', type=str,
help='Folder to download all content to',
required=True)
parser_download.add_argument('--progress', action='store_true',
help="Display progress bar for downloads")
# TODO: have option to only get types, ebooks, videos, etc do not enforce,
# but lower and just string match to the type in the api
parser_download = subparsers.add_parser(
'download',
help="Download content in your humble bundle library",
)
parser_download.add_argument(
'-c', '--cookie-file', type=str,
help="Location of the file to store the cookie",
default="hbd-cookies.txt",
)
parser_download.add_argument(
'-l', '--library-path', type=str,
help="Folder to download all content to",
required=True,
)
parser_download.add_argument(
'--progress',
action='store_true',
help="Display progress bar for downloads",
)
cli_args = parser.parse_args()
@@ -49,5 +62,8 @@ def cli():
elif cli_args.action == 'download':
from . import download_library
download_library(cli_args.cookie_file, cli_args.library_path,
progress_bar=cli_args.progress)
download_library(
cli_args.cookie_file,
cli_args.library_path,
progress_bar=cli_args.progress
)