junk removal

This commit is contained in:
Luke Smith
2019-05-20 15:17:19 -04:00
parent dda2c6059b
commit 00a0a7d45b
3 changed files with 0 additions and 167 deletions

View File

@@ -1,14 +0,0 @@
#!/bin/sh
[ -z "$1" ] && echo "Give either a pdf file or a DOI as an argument." && exit
if [ -f "$1" ]; then
# Try to get DOI from pdfinfo or pdftotext output.
doi=$(pdfinfo "$1" | grep -io "doi:.*") ||
doi=$(pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1) ||
exit 1
else
doi="$1"
fi
# Check crossref.org for the bib citation.
curl -s "http://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n"