mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01:00
Merge 6e0377b5a1aa2ef5ebf2cb8e3d7730d09f4c2c7f into 86f05abcce1fd270032975775adb40040c746cfe
This commit is contained in:
commit
7c1b992ca5
@ -4,7 +4,7 @@
|
|||||||
if [ -f "$1" ]; then
|
if [ -f "$1" ]; then
|
||||||
# Try to get DOI from pdfinfo or pdftotext output.
|
# Try to get DOI from pdfinfo or pdftotext output.
|
||||||
doi=$(pdfinfo "$1" | grep -io "doi:.*") ||
|
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
|
exit 1
|
||||||
else
|
else
|
||||||
doi="$1"
|
doi="$1"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user