3 #########################################################################
4 # This program is free software: you can redistribute it and/or modify #
5 # it under the terms of the version 3 of the GNU General Public License #
6 # as published by the Free Software Foundation. #
8 # This program is distributed in the hope that it will be useful, but #
9 # WITHOUT ANY WARRANTY; without even the implied warranty of #
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
11 # General Public License for more details. #
13 # You should have received a copy of the GNU General Public License #
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
16 # Written by and Copyright (C) Francois Fleuret #
17 # Contact <francois.fleuret@idiap.ch> for comments & bug reports #
18 #########################################################################
24 tmp=$(mktemp /tmp/arxiv-bib.sh.XXXXXX)
26 curl > "${tmp}" "https://arxiv.org/abs/$1"
32 [[ "${AUTHORS}" ]] && AUTHORS="${AUTHORS} and "
33 AUTHORS="${AUTHORS}${line}"
34 done < <(grep '<meta name="citation_author"' "${tmp}" | sed -e 's/^.*content="\([^,]*, .\).*$/\1./')
36 TITLE=$(grep '<meta name="citation_title"' x | sed -e 's/^.*content="\([^"]*\)".*$/\1/')
37 YEAR=$(echo $1 | sed -e 's/^\(..\).*$/20\1/')
46 url={https://arxiv.org/pdf/$1}