commit c72b641193b52c60745da57a8db8ce29d8c79dac
parent 9f6bc2b6b5fbec6457b0a87a7ce807d52998429e
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 10 Apr 2020 08:11:00 +0200
Get pdf directly from the-cryosphere and the-cryosphere-discuss
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/.local/bin/plumb b/.local/bin/plumb
@@ -143,6 +143,16 @@ handle_target() {
case "$t" in
*scholar.google.*)
t="$(printf '%s' "$t" | sed 's/.*scholar_url?url\=//;s/&hl\=.*//')";;
+ *the-cryosphere-discuss.net/tc-*/)
+ a="$(printf '%s' "$t" | sed 's/.*\(tc-[0-9]*-[0-9]*\).*/\1/')"
+ t="${t}${a}.pdf";;
+ *the-cryosphere.net/*/*/*/)
+ v="$(printf '%s' "$t" | sed 's,.*/\([0-9][0-9]\)/.*,\1,')"
+ n="$(printf '%s' "$t" | sed 's,.*/[0-9][0-9]/\([0-9][0-9][0-9][0-9]\)/.*,\1,')"
+ y="$(printf '%s' "$t" | sed 's,.*/\([0-9][0-9][0-9][0-9]\)/.*,\1,')"
+ t="${t}tc-${v}-${n}-${y}.pdf";;
+
+
esac
if regeximatch "$t" '\.(mp4|mkv|webm|avi|ogv|gifv)$'; then