Run Linux? Then you will know what to do with this:
Code:
#!/bin/ksh
#
# Simple script to be run via cron:
#
# 5 * * * * ~/powder-valley.sh
#
email='me@mail.dom'
in_stock="\nhttp://www.powdervalleyinc.com/primers.shtml\n\n"
command='links -force-html -dump'
cci_query='http://www.powdervalleyinc.com/CCIprimers.shtml'
cci_primer_rx='CCI(300|350|500|550).+(Yes)'
federal_query='http://www.powdervalleyinc.com/FEDprimers.shtml'
federal_primer_rx='FED(100|200|150|155).+(Yes)'
remington_query='http://www.powdervalleyinc.com/REMprimers.shtml'
remington_primer_rx='REM(1.5|2.5|5.5).+(Yes)'
typeset -i in_stock_chars=${#in_stock}
IFS=$'\n'
data=$(eval $command $cci_query)
for line in $data
do
if [[ "$line" =~ $cci_primer_rx ]]
then
in_stock="${in_stock}\n$line"
fi
done
data=$(eval $command $federal_query)
for line in $data
do
if [[ "$line" =~ $federal_primer_rx ]]
then
in_stock="${in_stock}\n$line"
fi
done
data=$(eval $command $remington_query)
for line in $data
do
if [[ "$line" =~ $remington_primer_rx ]]
then
in_stock="${in_stock}\n$line"
fi
done
if [[ ${#in_stock} -gt $in_stock_chars ]]
then
print $in_stock |mail -s 'Powder Valley Primers In Stock!' $email
fi

Make sure to signal when required while driving.
Comment