#!/bin/csh -f # wayback # ----------------------------------------------------------------------------- # Usage: See Usage section below or run with -h or --help to see usage. # Assumptions: # - Assumes WayBack Machine (http://archive.org) continues to use same # deep link URLs and specifying today's date instead of capture date # shows most recent capture. # Effects: # Notes: # Implementation Notes: # Portability Issues: # Revision History: # $Log$ # ----------------------------------------------------------------------------- set browser = "open" # If $1 is a script in the browsers folder, use it as the browser. if ($#argv > 0 && -x "$0:h/browsers/$1") then set browser = $1:q shift endif if ($#argv == 0) then (set echo; $browser "https://archive.org") else # Note: It may be true that leaving out the timestamp entirely also works. # For example: https://archive.org/web/$1 set timestamp = `date "+%Y%m%d%H%M%S"` (set echo; $browser "https://archive.org/web/$timestamp/$1") endif