Skip to content

Instantly share code, notes, and snippets.

@pawelz
Created April 11, 2010 17:08
Show Gist options
  • Save pawelz/362889 to your computer and use it in GitHub Desktop.
Save pawelz/362889 to your computer and use it in GitHub Desktop.
#!/bin/sh -e
config=$1;
shift
pid=$1;
shift
xid=$1;
shift
fifo=$1;
shift
socket=$1;
shift
url=$1;
shift
title=$1;
# Sanitize filename
filename=$(echo $title | tr -C '[:alnum:]\n' '_')
# Ask user for better filename
filename=$(zenity --file-selection --confirm-overwrite --save --filename $filename)
echo 'js document.documentElement.outerHTML' | \
socat - unix-connect:$socket | \
lynx -dump -stdin > $filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment