make ap work with newsday.com's changes
Reference: /n/sources/patch/applied/ap-fix
Date: Wed Jan 24 13:04:47 CET 2007
Signed-off-by: fshahriar@gmail.com
--- /rc/bin/ap Wed Jan 24 13:03:10 2007
+++ /rc/bin/ap Wed Jan 24 13:03:09 2007
@@ -6,7 +6,7 @@
wire='http://www.newsday.com/news/nationworld/wire'
if ( ~ $#* 0 )
hget $wire | #tee /tmp/ap.$pid |
- sed -n '/AP Top News/,/AP News Wire/p' |
+ sed -n '/
AP Top News/,/AP News Wire/p' |
htmlfmt -a -w 100 |
sed -n '
/^• / {
@@ -15,7 +15,7 @@
s/\n/ /g
s/\[\/news\/nationworld\/wire\//|/
s/sns-ap-//
- s/,[0-9]+,[0-9]+\.story.*$//
+ s/\.story.*$//
p
}' |
awk -F '|' '
@@ -30,10 +30,7 @@
hget $wire/sns-ap-^$1^.story |
htmlfmt |
sed '
- 1,/^=======$/d
- /^Email this story$/d
- /^Printer friendly format/d
+ 1,/^AP Top News$/d
/^\* __$/,$d
/^Subscribe to Newsday home delivery/,$d
- /^SPONSORED LINKS$/,$d
'