software/hoardy-web/./tool/script/hoardy-web-xdg-open

Passively capture, archive, and hoard your web browsing history, including the contents of the pages you visit, for later offline viewing, mirroring, and/or indexing. Your own personal private Wayback Machine that can also archive HTTP POST requests and responses, as well as most other HTTP-level data.

Files

Raw Source

Contents

#!/usr/bin/env bash
set -e

usage() {
    cat << EOF
usage: $0 [--help] WRR_FILE

Open \`response.body\` of the given WRR file with \`xdg-open\`.

This script only works for Debian's \`xdg-open\`, which waits for the child process to finish.

# Options:

  --help                print this message and exit

# Example:

  $0 path/to/wrr/file.wrr
EOF
}

while (($# > 0)); do
    case "$1" in
    --help) usage; exit 0 ;;
    *) break ;;
    esac
    shift
done

(($# > 0)) || { echo "error: need a WRR_FILE"; echo; usage; exit 1; } >&2

exec hoardy-web run -- xdg-open "$@"