From d1a5cfa585e152a385d37b7c3859e0948d446ab6 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 7 Feb 2003 15:09:14 +0000 Subject: =?UTF-8?q?=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD?= =?UTF-8?q?=EF=BF=BD=EF=BF=BD=EF=BF=BDg=EF=BF=BD=EF=BF=BD=EF=BF=BD?= =?UTF-8?q?=EF=BF=BDlynx=EF=BF=BD=EF=BF=BD=EF=BF=BD|?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@650 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/weather.perl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/weather.perl b/util/weather.perl index 88d380c1..911ff804 100644 --- a/util/weather.perl +++ b/util/weather.perl @@ -1,11 +1,15 @@ #!/usr/bin/perl -# $Id: weather.perl,v 1.3 2002/07/23 13:30:11 kcwu Exp $ +# $Id: weather.perl,v 1.4 2003/02/07 15:09:14 victor Exp $ # # 不能跑的話,看看 bbspost 的路徑是否正確。 # 如果發出的 post 沒有氣象報告而是說 URL 找不到,則確定一下能不能看到 # 中央氣象局的 WWW 及 URL 是否正確。 # 理論上適用所有 Eagle BBS 系列。 # -- Beagle Apr 13 1997 + +use lib '/home/bbs/bin'; +use LocalVars; + open(BBSPOST, "| bin/webgrep>etc/weather.tmp"); # 日期 open(DATE, "date +'%a %b %d %T %Y' |"); @@ -15,7 +19,7 @@ close DATE; # Header # 內容 -open(WEATHER, "/usr/bin/lynx -assume_charset=big5 -assume_local_charset=big5 -dump http://www.cwb.gov.tw/V3.0/weather/text/W03.htm |"); +open(WEATHER, "$LYNX -assume_charset=big5 -assume_local_charset=big5 -dump http://www.cwb.gov.tw/V3.0/weather/text/W03.htm |"); while () { print BBSPOST if ($_ ne "\n"); -- cgit v1.2.3