Exemplo n.º 1
0
def main():
    args = docopt(__doc__, help=True, version='Subtitles Client %s' % __version__)

    if args['download']:
        download_subtitles(args['<releases_path>'], args['--engine'], args['--lang'])
    elif args['exist']:
        is_subtitles_exist(args['<releases_path>'], args['--engine'], args['--lang'])
    elif args['test']:
        test_engines(args['<engines>'])
    elif args['--list']:
        for sub_site in SUBTITLE_SITE_LIST.keys():
            sub_dict = SUBTITLE_SITE_LIST.get(sub_site)
            print sub_dict.get('class_name')
Exemplo n.º 2
0
def test_engines(engines):
    if not engines:
        engines = SUBTITLE_SITE_LIST.keys()

    for engine_key in engines:
        t = SubtitleSite.class_factory(engine_key)
        t.test_engine()
Exemplo n.º 3
0
def test_engines(engines):
    if not engines:
        engines = SUBTITLE_SITE_LIST.keys()

    for engine_key in engines:
        t = SubtitleSite.class_factory(engine_key)
        t.test_engine()
Exemplo n.º 4
0
def main():
    args = docopt(__doc__,
                  help=True,
                  version='Subtitles Client %s' % __version__)

    if args['download']:
        download_subtitles(args['<releases_path>'], args['--engine'],
                           args['--lang'])
    elif args['exist']:
        is_subtitles_exist(args['<releases_path>'], args['--engine'],
                           args['--lang'])
    elif args['test']:
        test_engines(args['<engines>'])
    elif args['--list']:
        for sub_site in SUBTITLE_SITE_LIST.keys():
            sub_dict = SUBTITLE_SITE_LIST.get(sub_site)
            print sub_dict.get('class_name')