summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-03-09 16:30:57 +0100
committerRobin Krahl <me@robin-krahl.de>2018-03-09 16:30:57 +0100
commitcfa1913e70ac5dc60939750e27c5ebf9637415d7 (patch)
treefd6b9fdeb47422c74fe0a8d8b9c3c0a4d0764a04
parent3b15e2a0432c96e3cf96555bbdf1c12a562b5921 (diff)
downloadbibtool-cfa1913e70ac5dc60939750e27c5ebf9637415d7.tar.gz
bibtool-cfa1913e70ac5dc60939750e27c5ebf9637415d7.tar.bz2
Use .bib extension when editing Bibtex data
-rw-r--r--bibtool/cli.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bibtool/cli.py b/bibtool/cli.py
index 8f29588..3056933 100644
--- a/bibtool/cli.py
+++ b/bibtool/cli.py
@@ -34,7 +34,8 @@ def _import(filename, directory, delete):
entry = bibtex_data.entries[0]
click.echo('Found one Bibtex entry: ' + entry['ID'])
if click.confirm('Do you want to edit the entry?'):
- edited_data = click.edit(bibtexparser.dumps(bibtex_data))
+ edited_data = click.edit(bibtexparser.dumps(bibtex_data),
+ extension='.bib')
if edited_data:
bibtex_data = bibtexparser.loads(edited_data)
if len(bibtex_data.entries) != 1: