+nmap_svcs=/usr/share/nmap/nmap-services
+ grep -v ^# $nmap_svcs |cut -f2 |grep -vE '/udp$' |grep -oE '^[0-9]+'
+if [[ ! -v known_tcp_ports ]] && [ -r $nmap_svcs ]
+then known_tcp_ports=($(known_tcp_ports_f))
+ local inp_cksum=$(echo -n "$*" |cksum |cut -d' ' -f1)
+ if [[ ! -v known_tcp_ports ]]
+ then head -c4 <<<$inp_cksum
+ for port_gen_offset in `seq 6`
+ do local potential_port=$(tail -c+$port_gen_offset <<<$inp_cksum |head -c4)
+ until [ ! $c -lt ${#known_tcp_ports[*]} ] ||
+ [ $potential_port = ${known_tcp_ports[$c]} ]
+ if [ $c -eq ${#known_tcp_ports[*]} ]
+ then echo $potential_port
+then hopts="-e UTF-8 --subdirectories"
+port=$(cksum_port documents)
+rm -v ~/tmp/hatta-thelight.?????.out
+hat_out=$(mktemp -p ~/tmp hatta-thelight.XXXXX.out)
+hatta_cache=$HOME/tmp/hatta-documents
+nohup python -m hatta $hopts \
+ -d ~/documents/wiki/pages \
+ -n 'thelight wiki' &> $hat_out &
+career_wiki_repo=$HOME/documents/career/wiki
+port=$(cksum_port $career_wiki_repo)
+rm -v ~/tmp/hatta-career.?????.out
+hat_out=$(mktemp -p ~/tmp hatta-career.XXXXX.out)
+hatta_cache=$HOME/tmp/hatta-career
+nohup python -m hatta $hopts \
+ -n 'career wiki' &> $hat_out &
+rm -v ~/tmp/hatta-$bn.?????.out
+hat_out=$(mktemp -p ~/tmp hatta-$bn.XXXXX.out)
+hatta_cache=$HOME/tmp/hatta-$bn
+nohup python -m hatta $hopts \
+ -n "$bn wiki" &> $hat_out &
+dirct="$(echo $HOME/*/$1/.hg |awk '{print $1}')"
+dirct="$(dirname "$dirct")"
+bn="$(basename "$dirct")"
+rm -v ~/tmp/hatta-$bn.?????.out
+hat_out=$(mktemp -p ~/tmp hatta-$bn.XXXXX.out)
+hatta_cache=$HOME/tmp/hatta-$bn
+nohup python -m hatta $hopts \
+ -n "$bn wiki" &> $hat_out &
+if [[ -v hat_out ]] && [[ -v port ]]
+then until curl -sf http://localhost:$port/ >/dev/null
+ firefox http://localhost:$port/ &