diff --git a/setup.py b/setup.py index 5207343..c0649d0 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ with open('README.md') as file: setup( name="tatt", - version="0.951", + version="0.953", py_modules=['tatt'], url='https://github.com/zevaverbach/tatt', install_requires=[ diff --git a/tatt/transcribe.py b/tatt/transcribe.py index 3dfa9de..f8462ec 100644 --- a/tatt/transcribe.py +++ b/tatt/transcribe.py @@ -25,11 +25,16 @@ def get(name, save): except exceptions.NotAvailable as e: raise click.ClickException(str(e)) - filepath = None + file = None if save: - filepath = f'{name}.json' + filepath = f'{name}.json', 'w' + file = open(filepath) - click.echo(transcript, file=filepath) + click.echo(transcript, file=file) + + if file: + click.echo(f'Saved transcript to {filepath}.') + file.close()