mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01:00
Merge 6e0377b5a1aa2ef5ebf2cb8e3d7730d09f4c2c7f into 9a85d328ccf29f4cebb104e4eeeba1b20a896f6b
This commit is contained in:
commit
94008c2575
@ -4,7 +4,7 @@
|
||||
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 - | sed -n '/[dD][oO][iI]:/{s/.*[dD][oO][iI]:\s*\(\S\+[[:alnum:]]\).*/\1/p;q}') ||
|
||||
doi=$(pdftotext "$1" 2>/dev/null - | sed -n -E 's/.*((DOI|doi)((\.(org))?\/?|:? *))([^: ]+[^ .]).*/doi:\6/p; T; q' ||
|
||||
exit 1
|
||||
else
|
||||
doi="$1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user