Parse command-line arguments. Arguments may consist of any
    combination of directories, files, and options.

def parse(args, epilog):
    """
    Parse command-line arguments. Arguments may consist of any
    combination of directories, files, and options.
    """

    import argparse
    from locale import getlocale

    # set the default language
    default_language = getlocale()[0].split('_')[0].lower()

    parser = argparse.ArgumentParser(
        add_help=False,
        description=__description__,
        epilog=epilog,
        prog=__program__,
        usage='%(prog)s [OPTIONS] FILES|FOLDERS')
    parser.add_argument(
        '-d', '--downloader',
        default=Config.DOWNLOADER_DEFAULT,
        dest='downloader',
        help='indicate downloader to use')
    parser.add_argument(
        '-l', '--language',
        default=default_language,
        dest='language',
        help='indicate language to use [{}]'.format(default_language))
    parser.add_argument(
        '-q', '--quiet',
        action='store_true',
        dest='quiet',
        help='do not display failure notifications via notify-send')
    parser.add_argument(
        '-r', '--rename',
        action='store_true',
        dest='rename',
        help='prompt to rename video files')
    parser.add_argument(
        '-s', '--scan',
        action='store_true',
        dest='scan',
        help='remove advertising from subtitle files')
    parser.add_argument(
        '-h', '--help',
        action='help',
        help=argparse.SUPPRESS)
    parser.add_argument(
        '--version',
        action='version',
        version='%(prog)s ' + __version__)
    parser.add_argument(
        action='append',
        dest='targets',
        help=argparse.SUPPRESS,
        nargs='*')

    options = parser.parse_args(args)
    arguments = options.targets[0]

    return options, arguments