Change quotes

This commit is contained in:
Serene-Arc 2021-03-08 12:09:39 +10:00 committed by Ali Parlakci
parent 5a2e045c77
commit 1422591bf4

View File

@ -9,91 +9,92 @@ from bulkredditdownloader.exceptions import BulkDownloaderException
logger = logging.getLogger()
parser = argparse.ArgumentParser(allow_abbrev=False,
description="This program downloads media from reddit posts")
description='This program downloads media from reddit posts')
def _add_options():
parser.add_argument("directory",
help="Specifies the directory where posts will be downloaded to",
metavar="DIRECTORY")
parser.add_argument("--verbose", "-v",
action="store_true",
parser.add_argument('directory',
help='Specifies the directory where posts will be downloaded to',
metavar='DIRECTORY')
parser.add_argument('--verbose', '-v',
action='store_true',
count=True)
parser.add_argument("--link", "-l",
help="Get posts from link",
parser.add_argument('--link', '-l',
help='Get posts from link',
action='append',
metavar="link")
parser.add_argument("--submitted",
action="store_true",
help="Gets posts of --user")
parser.add_argument("--saved",
action="store_true",
help="Gets upvoted posts of --user")
parser.add_argument("--upvoted",
action="store_true",
help="Gets upvoted posts of --user")
parser.add_argument("--subreddit",
nargs="+",
help="Triggers subreddit mode and takes subreddit's name without r/. use \"frontpage\" "
"for frontpage",
metavar="SUBREDDIT",
metavar='link')
parser.add_argument('--submitted',
action='store_true',
help='Gets posts of --user')
parser.add_argument('--saved',
action='store_true',
help='Gets upvoted posts of --user')
parser.add_argument('--upvoted',
action='store_true',
help='Gets upvoted posts of --user')
parser.add_argument('--subreddit',
nargs='+',
help='Triggers subreddit mode and takes subreddit name. use \"frontpage\" for frontpage',
metavar='SUBREDDIT',
type=str)
parser.add_argument("--multireddit",
help="Triggers multireddit mode and takes multireddit's name without m",
metavar="MULTIREDDIT",
parser.add_argument('--multireddit',
help='Triggers multireddit mode and takes multireddit name',
metavar='MULTIREDDIT',
action='append',
type=str)
parser.add_argument("--user",
help="reddit username if needed. use \"me\" for current user",
required="--multireddit" in sys.argv or "--submitted" in sys.argv,
metavar="redditor",
parser.add_argument('--authenticate',
action='store_true')
parser.add_argument('--user',
help='reddit username if needed. use "me" for current user',
required='--multireddit' in sys.argv or '--submitted' in sys.argv,
metavar='redditor',
default=None,
type=str)
parser.add_argument("--search",
help="Searches for given query in given subreddits",
metavar="query",
parser.add_argument('--search',
help='Searches for given query in given subreddits',
metavar='query',
default=None,
type=str)
parser.add_argument("--sort",
help="Either hot, top, new, controversial, rising or relevance default: hot",
choices=["hot", "top", "new", "controversial", "rising", "relevance"],
metavar="SORT TYPE",
parser.add_argument('--sort',
help='Either hot, top, new, controversial, rising or relevance default: hot',
choices=['hot', 'top', 'new', 'controversial', 'rising', 'relevance'],
metavar='SORT TYPE',
default='hot',
type=str)
parser.add_argument("--limit",
help="default: unlimited",
metavar="Limit",
parser.add_argument('--limit',
help='default: unlimited',
metavar='Limit',
default=None,
type=int)
parser.add_argument("--time",
help="Either hour, day, week, month, year or all. default: all",
choices=["all", "hour", "day", "week", "month", "year"],
metavar="TIME_LIMIT",
parser.add_argument('--time',
help='Either hour, day, week, month, year or all. default: all',
choices=['all', 'hour', 'day', 'week', 'month', 'year'],
metavar='TIME_LIMIT',
default='all',
type=str)
parser.add_argument("--skip",
nargs="+",
help="Skip posts with given type",
parser.add_argument('--skip',
nargs='+',
help='Skip posts with given type',
type=str,
default=[])
parser.add_argument("--skip-domain",
nargs="+",
help="Skip posts with given domain",
parser.add_argument('--skip-domain',
nargs='+',
help='Skip posts with given domain',
type=str,
default=[])
parser.add_argument("--set-folder-scheme",
action="store_true",
help="Set custom folderpath",
parser.add_argument('--set-folder-scheme',
action='store_true',
help='Set custom folderpath',
default='{SUBREDDIT}'
)
parser.add_argument("--set-file-scheme",
action="store_true",
help="Set custom filename",
parser.add_argument('--set-file-scheme',
action='store_true',
help='Set custom filename',
default='{REDDITOR}_{TITLE}_{POSTID}'
)
parser.add_argument("--no-dupes",
action="store_true",
help="Do not download duplicate posts on different subreddits",
parser.add_argument('--no-dupes',
action='store_true',
help='Do not download duplicate posts on different subreddits',
)