From ed3f5476c718ff469211a4b73751c32677caa1b4 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 21 May 2015 10:52:38 +0100 Subject: Add wrapper scripts to download images as appropriate for displaying webpages --- read-webpage-with-images | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 read-webpage-with-images (limited to 'read-webpage-with-images') diff --git a/read-webpage-with-images b/read-webpage-with-images new file mode 100755 index 0000000..b6206d7 --- /dev/null +++ b/read-webpage-with-images @@ -0,0 +1,14 @@ +#!/bin/sh + +usage="Usage: $0 url" + +test $# -ne 1 && echo "$usage" && exit 1 + +t=`mktemp -d` || exit 1 +cd "$t" +f=`basename "$1"` +d=`dirname "$1"` +curl -L -s -S "$1" | iconv -t utf-8//ignore | pandoc --no-wrap -f html -t markdown > "$f" +pull-images "$f" "$d" +tkread -m < "$f" +rm -rf "$t" -- cgit v1.2.3