File:  [Local Repository] / reports / sendcalendar.sh
Revision 1.5: download - view: text, annotated - select for diffs - revision graph
Tue Aug 21 03:57:16 2007 UTC (16 years, 10 months ago) by boris
Branches: MAIN
CVS tags: HEAD
New info

    1: #!/bin/sh
    2: ADDRESS="chronicles@chgk.info"
    3: #ADDRESS=boris
    4: URL=http://letopis.chgk.info/calendar.html
    5: 
    6: echo "Sending notification to $ADDRESS"
    7: echo > calendar.txt
    8: echo "Текущий календарь по данным $URL:" >> calendar.txt
    9: echo >> calendar.txt
   10: sed '
   11: 1,/<table/d
   12: /<\/table/,$d
   13: /^<!--/d
   14: s/<tr>/\./
   15: s/<[^>]*>//g
   16: s/<[^>]*$//g
   17: s/^[^<]*>//g
   18: s/&lt;[a-zA-Z\._0-9-]*@[a-zA-Z\._0-9-]*&gt;/<address>/g
   19: /^[ 	]*$/d
   20: s/^.$//' calendar.html>> calendar.txt
   21: echo >> calendar.txt
   22: echo "--" >> calendar.txt
   23: echo "Ваш робот" >> calendar.txt
   24: echo >> calendar.txt
   25: fortune lec >> calendar.txt
   26: mail -s "Novosti v kalendare" $ADDRESS < calendar.txt

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