File:  [Local Repository] / reports / sendcalendar.sh
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Mon May 26 03:27:29 2003 UTC (21 years ago) by boris
Branches: MAIN
CVS tags: HEAD
Added mordor

#!/bin/sh
ADDRESS="chronicles@chgk.info"
#ADDRESS=boris
URL=http://letopis.chgk.info/calendar.html

echo "Sending notification to $ADDRESS"
echo > calendar.txt
echo "Текущий календарь по данным $URL:" >> calendar.txt
echo >> calendar.txt
sed '
1,/<table/d
/<\/table/,$d
/^<!--/d
s/<tr>/\./
s/<[^>]*>//g
s/<[^>]*$//g
s/^[^<]*>//g
s/&lt;/</g
s/&gt;/>/g
/^[ 	]*$/d
s/^.$//' calendar.html>> calendar.txt
echo >> calendar.txt
echo "--" >> calendar.txt
echo "Ваш робот" >> calendar.txt
echo >> calendar.txt
# fortune /usr/local/share/games/fortunes >> letter.txt
mail -s "Novosti v kalendare" $ADDRESS < calendar.txt

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>