dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 4f1f187037f4da65419854c995a2ccdb66905155
parent ccf219e35baaed63822338f39bc39fd61ad17269
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 15 Sep 2020 11:55:07 +0200

plumb: transform tc.copernicus.org URLs to pdf download

Diffstat:
M.local/bin/plumb | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/.local/bin/plumb b/.local/bin/plumb @@ -189,6 +189,8 @@ handle_url() { y="$(printf '%s' "$t" | \ sed 's,.*/\([0-9][0-9][0-9][0-9]\)/.*,\1,')" t="${t}tc-${v}-${n}-${y}.pdf";; + *tc.copernicus.org/articles/*/) + t="$(printf '%s' "$t" | awk -F/ -v h="$t" '{print h"tc-"$5"-"$6"-"$7".pdf"}')" esac if regexmatch "$t" '^(0|1|3|7|9|g|I|h)' && \