aboutsummaryrefslogtreecommitdiff
path: root/doi2bib
diff options
context:
space:
mode:
Diffstat (limited to 'doi2bib')
-rwxr-xr-xdoi2bib3
1 files changed, 2 insertions, 1 deletions
diff --git a/doi2bib b/doi2bib
index 1c26d21..b669737 100755
--- a/doi2bib
+++ b/doi2bib
@@ -1,6 +1,7 @@
#!/usr/bin/python3
# Adapted from https://scipython.com/blog/doi-to-bibtex/
+import os
import sys
import pycurl
from io import BytesIO
@@ -12,7 +13,7 @@ BASE_URL = 'http://dx.doi.org/'
try:
doi = sys.argv[1]
except IndexError:
- print('Usage:\n{} <doi>'.format(sys.argv[0]))
+ print('usage: {} <doi>'.format(os.path.basename(sys.argv[0])))
sys.exit(1)
url = BASE_URL + doi