diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/lunar-1,15run.pl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/lunar-1,15run.pl b/util/lunar-1,15run.pl new file mode 100644 index 00000000..52ea8cea --- /dev/null +++ b/util/lunar-1,15run.pl @@ -0,0 +1,10 @@ +#!/usr/bin/perl +use LocalVars; +# 每農曆初一, 十五就會跑一次 $ARGV[0] +# 資料來源 http://tw.weathers.yahoo.com/ +open FH, "$LYNX -source http://tw.weathers.yahoo.com/ | grep '民國'|"; +$din = <FH>; +close FH; + +($month, $day) = $din =~ /農曆 (.*?)月 (.*?)日/; +system($ARGV[0]) if( $day eq '一' || $day eq '十五' ); |