CLI is working for submitting jobs to Amazon. started retrieval and listing functionality

This commit is contained in:
2019-02-11 22:46:46 -05:00
parent b29e7acac9
commit 27254c14c4
7 changed files with 346 additions and 72 deletions

23
helpers.py Normal file
View File

@@ -0,0 +1,23 @@
import config
def print_all_services(free_only=False, print_=True):
# TODO: make a jinja template for this
all_services_string = (
'\n\nHere are all the available ' +
f'{"free " if free_only else ""}speech-to-text services:' +
'\n\n' +
'\n'.join(['{}{}{}{}'.format('\t', service_name, '\t\t',
f'({info["free"].replace("_", " ")})'
if isinstance(info["free"], str) else ""
)
for service_name, info in
config.STT_SERVICES.items()])
+ '\n'
)
if print_:
print(all_services_string)
return all_services_string