From 2a3b85a8b5e793421862964e2ecfcc0d3d16aa29 Mon Sep 17 00:00:00 2001 From: zevav Date: Wed, 20 Feb 2019 11:21:33 -0500 Subject: [PATCH] renamed STT_SERVICES to SERVIES --- setup.py | 2 +- tatt/helpers.py | 6 +++--- tatt/transcribe.py | 4 ++-- tatt/vendors/__init__.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 4209e87..51f0ce8 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ with open('README.md') as file: setup( name="tatt", - version="0.941", + version="0.942", py_modules=['tatt'], url='https://github.com/zevaverbach/tatt', install_requires=[ diff --git a/tatt/helpers.py b/tatt/helpers.py index 7006927..aa7f4b9 100644 --- a/tatt/helpers.py +++ b/tatt/helpers.py @@ -15,7 +15,7 @@ def make_string_all_services(free_only=False): format_fill = "free " all_services_string = all_services_string_formatter.format(format_fill) - for service_name, module in vendors.STT_SERVICES.items(): + for service_name, module in vendors.SERVICES.items(): if free_only and module.cost_per_15_seconds > 0: continue all_services_string += ( @@ -26,7 +26,7 @@ def make_string_all_services(free_only=False): def get_service(service_name): - module = vendors.STT_SERVICES[service_name] + module = vendors.SERVICES[service_name] return getattr(module, config.SERVICE_CLASS_NAME) @@ -55,7 +55,7 @@ def print_transcription_jobs(jobs): def get_transcription_jobs(service_name=None, name=None, status=None): all_jobs = {} - for stt_name in vendors.STT_SERVICES: + for stt_name in vendors.SERVICES: if service_name is None or service_name == stt_name: service = get_service(stt_name) service._setup() # check for AWS credentials and create buckets diff --git a/tatt/transcribe.py b/tatt/transcribe.py index b743ec9..49c7bd5 100644 --- a/tatt/transcribe.py +++ b/tatt/transcribe.py @@ -39,7 +39,7 @@ def get(name, file): @click.option('--status', type=str, help="completed | failed | in_progress") def list(name, service, status): """Lists available STT services.""" - if service is not None and service not in vendors.STT_SERVICES: + if service is not None and service not in vendors.SERVICES: raise click.ClickException(f'no such service: {service}') try: @@ -67,7 +67,7 @@ def services(free_only): @click.argument('service_name', type=str) def this(dry_run, media_filepath, service_name): """Sends a media file to be transcribed.""" - if service_name not in vendors.STT_SERVICES: + if service_name not in vendors.SERVICES: print() raise click.ClickException( f'No such service! {print_all_services(print_=False)}') diff --git a/tatt/vendors/__init__.py b/tatt/vendors/__init__.py index 8ac4355..7e5b2d5 100644 --- a/tatt/vendors/__init__.py +++ b/tatt/vendors/__init__.py @@ -1,5 +1,5 @@ from tatt.vendors import amazon -STT_SERVICES = { +SERVICES = { 'amazon': amazon, }