#!/bin/bash
##############################################################
## #! Forums Active Topics Pipe Menu ##
## ##
## v 1.0 by jpope 01.18.2010 ##
## - based on conky config by mrpeachy @ ##
## http://crunchbanglinux.org/forums/post/51330/#p51330 ##
## ##
## ##
##############################################################
## Settings
browser=$(echo firefox-3.5)
curl 'http://crunchbanglinux.org/forums/search/recent/' > ~/tmp/forums.html
tempfile=$(echo file:///home/$(whoami)/tmp/forums.html)
## Data
topic1=$(curl $tempfile | grep -n ' ' '{print $2}' | awk -F'' '{print $1}' | sed "s|'|'|g" | fold -sw 40)
link1=$(curl $tempfile | grep -n ' ' '{print $1}')
link1b=$(curl $tempfile | grep -n '' '{print $1}')
timestamp1=$(curl $tempfile | grep -n '' '{print $2}' | awk -F'' '{print $1}' | sed "s|'|'|g" | fold -sw 40)
link2=$(curl $tempfile | grep -n ' ' '{print $1}')
link2b=$(curl $tempfile | grep -n '' '{print $1}')
timestamp2=$(curl $tempfile | grep -n '' '{print $2}' | awk -F'' '{print $1}' | sed "s|'|'|g" | fold -sw 40)
link3=$(curl $tempfile | grep -n ' ' '{print $1}')
link3b=$(curl $tempfile | grep -n '' '{print $1}')
timestamp3=$(curl $tempfile | grep -n '' '{print $2}' | awk -F'' '{print $1}' | sed "s|'|'|g" | fold -sw 40)
link4=$(curl $tempfile | grep -n ' ' '{print $1}')
link4b=$(curl $tempfile | grep -n '' '{print $1}')
timestamp4=$(curl $tempfile | grep -n '' '{print $2}' | awk -F'' '{print $1}' | sed "s|'|'|g" | fold -sw 40)
link5=$(curl $tempfile | grep -n ' ' '{print $1}')
link5b=$(curl $tempfile | grep -n '' '{print $1}')
timestamp5=$(curl $tempfile | grep -n '