#!/bin/csh -f # facebook # ----------------------------------------------------------------------------- # C shell script to view and search Facebook, optionally also viewing # other social media sites # ----------------------------------------------------------------------------- # Usage: Run with -h or --help option to see usage. # Assumptions: # Effects: # Notes: # Implementation Notes: # Portability Issues: # Revision History: # $Log$ # ----------------------------------------------------------------------------- if ("$1" == "-h" || "$1" == "--help") then echo "Usage: $0:t [options]" echo "options:" echo "-q = Quick. Facebook only, no other social media" echo "-h = Show this help info" echo "--help = Show this help info" exit 1 endif set facebook_only = "false" if ("$1" == "-q") then set facebook_only = "true" shift endif 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://www.facebook.com/search/top/?q=$1:q%20$2:q%20$3:q%20$4:q%20$5:q%20$6:q%20$7:q%20$8:q%20$9:q%20$10:q%20$11:q%20$12:q%20$13:q%20$14:q%20$15:q%20$16:q%20$17:q%20$18:q%20$19:q%20$20:q") else (set echo; $browser "http://www.facebook.com/?sk=lf") if ("$facebook_only" == "false") then set action = `promptloop "Groups (y/n)? " y n` if ("${action}" == "y") then fb_groups $browser $*:q endif endif endif