diff options
-rwxr-xr-x | doi2bib | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |