diff options
-rwxr-xr-x | xii | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#!/bin/sh + +# Download and display X-Image images + +: ${VIEWER:=fbi} + +# Create temporary directory for images +dir=/tmp/$RANDOM +mkdir $dir + +grep '^X-Image: ' | +sed 's/^X-Image: //' | +while read url +do + curl "$url" > $dir/$RANDOM +done + +# Display images and delete them afterwards +$VIEWER $dir/* < /dev/tty +rm -r $dir |