updated git and svn scripts
[xrzperl.git] / urlrule_get
blob57b8cebdae93bc16814b8cc1748f0b46d6d6b926
1 #!/usr/bin/perl -w
2 # $Id$
3 ###APPNAME: urlrule_get
4 ###APPAUTHOR: duel
5 ###APPDATE: Mon Mar 24 06:25:31 2008
6 ###APPVER: 0.1
7 ###APPDESC: apply rule for URL,and perform action
8 ###APPUSAGE: urlrule_get URL [0-5] [action args...]
9 ###APPEXAMPLE: urlrule_get http://www.sina.com.cn 0 cat
10 use strict;
11 use lib $ENV{XR_PERL_MODULE_DIR};
12 use MyPlace::Script::Usage qw/help_even_empty/;
13 exit 0 if(help_even_empty($0,@ARGV));
15 use MyPlace::URLRule qw/parse_rule/;
16 my $rule = parse_rule(@ARGV);
17 exec("perl","-S","urlrule_action",@ARGV,"batchget -c -M 600 -f -n '$rule->{domain}\[$rule->{level}\]'");