From d5ce3d65833fd1407090d30ec62b0c87cb15ab1f Mon Sep 17 00:00:00 2001 From: zevav Date: Wed, 20 Feb 2019 12:03:42 -0500 Subject: [PATCH] formatted json transcript --- setup.py | 2 +- tatt/transcribe.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index e74afa4..d21c95b 100644 --- a/setup.py +++ b/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=[ diff --git a/tatt/transcribe.py b/tatt/transcribe.py index ac03997..b5da152 100644 --- a/tatt/transcribe.py +++ b/tatt/transcribe.py @@ -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')