From b75561585c6269196a3ffa8713621bb377f39fa8 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 1 Jun 2024 08:22:05 -0300 Subject: Fix: doi2bib: improved usage line --- doi2bib | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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{} '.format(sys.argv[0])) + print('usage: {} '.format(os.path.basename(sys.argv[0]))) sys.exit(1) url = BASE_URL + doi -- cgit v1.2.3