CLI is working for submitting jobs to Amazon. started retrieval and listing functionality
This commit is contained in:
23
helpers.py
Normal file
23
helpers.py
Normal 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
|
||||
Reference in New Issue
Block a user