diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-06-01 08:22:05 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-06-01 08:22:05 -0300 |
commit | b75561585c6269196a3ffa8713621bb377f39fa8 (patch) | |
tree | 4aabfdc2887fe8c6fe6f94cb0c8c85002159e3bb | |
parent | 49869d77725fceebccf7fb54559932cae8026b0e (diff) | |
download | scripts-b75561585c6269196a3ffa8713621bb377f39fa8.tar.gz scripts-b75561585c6269196a3ffa8713621bb377f39fa8.tar.bz2 |
Fix: doi2bib: improved usage line
-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 |