summaryrefslogtreecommitdiff
path: root/bibtool/cli.py
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-03-09 16:17:11 +0100
committerRobin Krahl <me@robin-krahl.de>2018-03-09 16:17:11 +0100
commit5be2e9ae50f9358d16f14e09c2e7d51ec1dc8755 (patch)
treea30d68209d07a085e16d76f77be5ec816e4a9414 /bibtool/cli.py
parent4a0cdafd28b4288b8f9fae9db84b0ebd8dfba8a8 (diff)
downloadbibtool-5be2e9ae50f9358d16f14e09c2e7d51ec1dc8755.tar.gz
bibtool-5be2e9ae50f9358d16f14e09c2e7d51ec1dc8755.tar.bz2
Add setup.py for Pip/setuptools support
Diffstat (limited to 'bibtool/cli.py')
-rw-r--r--bibtool/cli.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bibtool/cli.py b/bibtool/cli.py
index 3356d16..74855b9 100644
--- a/bibtool/cli.py
+++ b/bibtool/cli.py
@@ -37,7 +37,8 @@ def _import(filename, directory):
if edited_data:
bibtex_data = bibtexparser.loads(edited_data)
if len(bibtex_data.entries) != 1:
- raise Exception('The edited data must contain exactly one Bibtex entry.')
+ raise Exception('The edited data must contain exactly one'
+ 'Bibtex entry.')
entry = bibtex_data.entries[0]
click.confirm('Add {} to the repository?'.format(entry['ID']),
@@ -46,7 +47,7 @@ def _import(filename, directory):
bibfilename = os.path.join(directory, entry['ID'] + '.bib')
outfileext = os.path.splitext(filename)[1]
outfilename = os.path.join(directory, entry['ID'] + outfileext)
-
+
if os.path.exists(bibfilename) or os.path.exists(outfilename):
click.confirm('There is already a document with this ID in the '
'repository. Continue anyway?', abort=True)