From: Francois Fleuret Date: Fri, 5 Jan 2018 20:17:27 +0000 (+0100) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=c959baab4f9a2ba5b483a20336ef74b01704c6f7;p=scripts.git Update. --- diff --git a/arxiv-bib.sh b/arxiv-bib.sh deleted file mode 100755 index f8407e2..0000000 --- a/arxiv-bib.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -######################################################################### -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the version 3 of the GNU General Public License # -# as published by the Free Software Foundation. # -# # -# This program is distributed in the hope that it will be useful, but # -# WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see . # -# # -# Written by and Copyright (C) Francois Fleuret # -# Contact for comments & bug reports # -######################################################################### - - -set -e -set -o pipefail - -tmp=$(mktemp /tmp/arxiv-bib.sh.XXXXXX) - -while [[ "$1" ]] -do - if [[ $1 =~ ^http ]] - then - wget "$1" - id="$(echo "$1" | sed -e 's|^.*/\([^\]*\)$|\1|')" - filename="${id}.pdf" - else - filename="$1" - id="$(basename ${filename} .pdf)" - fi - - curl -s > "${tmp}" "https://arxiv.org/abs/${id}" - - AUTHORS="" - - while read line - do - [[ "${AUTHORS}" ]] && AUTHORS="${AUTHORS} and " - AUTHORS="${AUTHORS}${line}" - done < <(grep '