formatted json transcript
This commit is contained in:
2
setup.py
2
setup.py
@@ -6,7 +6,7 @@ with open('README.md') as file:
|
||||
|
||||
setup(
|
||||
name="tatt",
|
||||
version="0.947",
|
||||
version="0.949",
|
||||
py_modules=['tatt'],
|
||||
url='https://github.com/zevaverbach/tatt',
|
||||
install_requires=[
|
||||
|
||||
@@ -19,17 +19,17 @@ def cli():
|
||||
def get(name, save):
|
||||
"""Downloads and/or saves completed transcript."""
|
||||
try:
|
||||
transcript = helpers.get_transcript(name)
|
||||
transcript = json.dumps(helpers.get_transcript(name), indent=4)
|
||||
except exceptions.DoesntExistError:
|
||||
raise click.ClickException(f'no such transcript {name}')
|
||||
except exceptions.NotAvailable as e:
|
||||
raise click.ClickException(str(e))
|
||||
|
||||
if not save:
|
||||
pprint(transcript)
|
||||
click.echo(transcript)
|
||||
else:
|
||||
with open(f'{name}.json', 'w') as fout:
|
||||
fout.write(json.dumps(transcript))
|
||||
fout.write(transcript)
|
||||
click.echo(f'Okay, downloaded {name}.json')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user