iwla

iwla Git Source Tree

Root/iwla_convert.pl

1#!/usr/bin/perl
2
3my $awstats_lib_root = '/usr/share/awstats/lib/';
4my @awstats_libs = ('browsers.pm', 'browsers_phone.pm', 'mime.pm', 'referer_spam.pm', 'search_engines.pm', 'operating_systems.pm', 'robots.pm', 'worms.pm');
5
6foreach $lib (@awstats_libs) {require $awstats_lib_root . $lib;}
7
8open($FIC,">", "robots.py") or die $!;
9
10print $FIC "awstats_robots = [";
11$first = 0;
12foreach $r (@RobotsSearchIDOrder_list1)
13{
14 $r =~ s/\'/\\\'/g;
15 if ($first != 0)
16 {
17print $FIC ", ";
18 }
19 else
20 {
21$first = 1;
22 }
23 print $FIC "'.*$r.*'";
24}
25foreach $r (@RobotsSearchIDOrder_list2)
26{
27 $r =~ s/\'/\\\'/g;
28 print $FIC ", '.*$r.*'";
29}
30print $FIC "]\n\n";
31
32close($FIC);
33
34

Archive Download this file

Branches

Tags