/[kvake]/kvake.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /kvake.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Fri Apr 14 06:01:44 2000 UTC revision 1.4 by dpavlin, Fri Apr 14 07:24:06 2000 UTC
# Line 11  Line 11 
11  #  #
12  # 2000-02-16 Dobrica Pavlinusic <dpavlin@pliva.hr> prva perl verzija  # 2000-02-16 Dobrica Pavlinusic <dpavlin@pliva.hr> prva perl verzija
13  # 2000-03-01 DbP poravljen ignore_dirs grep bug  # 2000-03-01 DbP poravljen ignore_dirs grep bug
14    #
15    # 2000-03-31 Hana sada ignorira sve sto ^eng$, ^eng_ , ^adresar$ u imenu direktorija
16    
17  #$mod_time = 10*60;     # 10 minuta  $mod_time = 10*60;      # 10 minuta
18  $mod_time = 24*60*60;   # 1 day  #$mod_time = 24*60*60;  # 1 day
19    
20  $verbose = 0;  $verbose = 0;
21    
22  @ignore_dirs=( "/data/web/public/adresar/", "/data/web/public/eng" );  #@ignore_dirs=( "/data/web/public/adresar/", "/data/web/public/eng" );
23    
24    while (defined($ARGV[0]) && $ARGV[0] eq "-v") {
25            $verbose++;
26            shift @ARGV;
27    }
28    print STDERR "verbosity: $verbose\n" if ($verbose);
29    
30  if (! defined(@ARGV)) {  if (! defined(@ARGV) || ($#ARGV < 0)) {
31          @dirs=( "/data/web/public",          @dirs=( "/data/web/public",
32                  "/usr/users/it/dpeterc" );                  "/usr/users/it/dpeterc" );
33  } else {  } else {
34          @dirs=@ARGV;          @dirs=@ARGV;
35  }  }
36    
37    print STDERR "Scanning dirs: @dirs\n" if ($verbose);
38    
39  foreach $dir (@dirs) {  foreach $dir (@dirs) {
40          opendir(DIR,"$dir") || warn "can't open $dir: $!";          opendir(DIR,"$dir") || warn "can't open $dir: $!";
41          foreach $f (grep { !/^\./ } readdir(DIR)) {          foreach $f (grep { !/^\./ } readdir(DIR)) {
42                  if (-f "$dir/$f" && ! -l "$dir/$f") {                  if (-d "$dir/$f" && $f !~ /^eng$/ && $f !~ /^adresar$/ && $f !~ /^eng_/) {
43                          print "jedan od fileka dir/$f\n";                          $push_it = 1;
44                            push @dirs,"$dir/$f" if ($push_it);
45                    }
46                    elsif (-f "$dir/$f" && ! -l "$dir/$f") {
47                          @stat = stat(_);                          @stat = stat(_);
48                          if ($f =~ /\.html/ && (time() - $stat[9]) < $mod_time) {                          if ($f =~ /\.html/ && (time() - $stat[9]) < $mod_time) {
49                                    print "filek za mjenjanje `$dir/$f\n" if ($verbose);
50                                  push @files,"$dir/$f";                                  push @files,"$dir/$f";
51                          }                          }
52                  } elsif (-d "$dir/$f") {                          else {
53                          $push_it = 1;                                  print "ovo je staro: $dir/$f\n" if ($verbose > 1);
                         foreach $ig_dir (@ignore_dirs) {  
 #                               print "\t$dir/$f -- $ig_dir\n";  
                                 if ("$dir/$f" =~ m,$ig_dir,) {  
                                         print "skipping $dir/$f (in ignore list)\n" if ($verbose);  
                                         $push_it = 0;  
                                 }  
54                          }                          }
55                          push @dirs,"$dir/$f" if ($push_it);                  }
56                  } else {                  elsif ($f =~ /^eng$/ || $f =~ /adresar/ || $f =~ /^eng_/) {
57                          print "skipping $dir/$f\n" if ($verbose);                                  print "preskacem jer je  eng ili adresar $dir/$f\n" if ($verbose);
58                    }
59                    else {
60                                    print "ovo je link $dir/$f\n" if ($verbose);
61                  }                  }
62          }                }      
63          closedir DIR;          closedir DIR;
64  }  }
65    
 #foreach $file ("/data/web/public/VIJESTI/30ozpotpiskol.html") {  
66  foreach $file (@files) {  foreach $file (@files) {
67          if (open(IN,"$file")) {          if (open(IN,"$file")) {
68                  print "$file\n" if ($verbose);                  print "$file\n" if ($verbose);
# Line 79  foreach $file (@files) { Line 89  foreach $file (@files) {
89  1;  1;
90    
91  sub replace {  sub replace {
92            do '/root/kvake/zamjene.pl';
 s/ch/č/g; s/CH/Č/g;  
 s/cc/ć/g; s/CC/Ć/g;  
 s/zh/ž/g; s/ZH/Ž/g;  
 s/sh/š/g; s/SH/Š/g;  
 s/dh/đ/g; s/DH/Đ/g;  
                           
 s/ ČN / CHN /g;  
 s/18th IĆ Sto/18th ICC Sto/g;  
 s/aćepted/accepted/g;  
 s/aćount/account/g;  
 s/aćumulated/accumulated/g;  
 s/Aćount/Account/g;  
 s/Aćess/Access/g;  
 s/ačieved/achieved/g;  
 s/ančor/anchor/g;  
 s/ANČOR/ANCHOR/g;  
 s/approačing/approaching/g;  
 s/Batč/Batch/g;  
 s/BATČ/BATCH/g;  
 s/Bayerisče/Bayerische/g;  
 s/Beečam/Beecham/g;  
 s/BEEČAM/BEECHAM/g;  
 s/Bioteč/Biotech/g;  
 s/infoteč/infotech/g;  
 s/Blue čip/Blue chip/g;  
 s/Boćoni/Bocconi/g;  
 s/BRONČITIS/BRONCHITIS/g;  
 s/ČANGE/CHANGE/g;  
 s/čange/change/g;  
 s/čaracteris/characteris/g;  
 s/ČARACTERISTICS/CHARACTERISTICS/g;  
 s/čart /chart /g;  
 s/caš/cash/g;  
 s/cašless/cashless/g;  
 s/čarset/charset/g;  
 s/čeck/check/g;  
 s/Cellteč/Celltech/g;  
 s/čemi/chemi/g;  
 s/ČEMI/CHEMI/g;  
 s/čemotherapy/chemotherapy/g;  
 s/čildbearing/childbearing/g;  
 s/ČILDREN/CHILDREN/g;  
 s/ČIRON/CHIRON/g;  
 s/ČLAMIDIA/CHLAMIDIA/g;  
 s/ČLAMYDIAL/CHLAMYDIAL/g;  
 s/čool/chool/g;  
 s/ČROMOS/CHROMOS/g;  
 s/ČRONIC/CHRONIC/g;  
 s/čronic/chronic/g;  
 s/Daiiči/Daiichi/g;  
 s/Deutsč/Deutsch/g;  
 s/Doxyćline/Doxyccline/g;  
 s/dkatčalkov/dkatchalkov/g;  
 s/ eač / each /g;  
 s/eandryusčenko/eandryuschenko/g;  
 s/einrič/einrich/g;  
 s/ekartaševa/ekartasheva/g;  
 s/Engliš/English/g;  
 s/engliš/english/g;  
 s/esterreič/esterreich/g;  
 s/FINIŠED/FINISHED/g;  
 s/FREŠ/FRESH/g;  
 s/freš/fresh/g;  
 s/Goldšield/Goldshield/g;  
 s/gonocoćal/gonococcal/g;  
 s/Hoečst/Hoechst/g;  
 s/IFSĆ/IFSCC/g;  
 s/ilevšin/ilevshin/g;  
 s/išođenje/ishođenje/g;  
 s/išoditi/ishoditi/g;  
 s/išode/ishode/g;  
 s/Itača/Itacha/g;  
 s/Karpisčenko/Karpischenko/g;  
 s/LAČEM/LACHEM/g;  
 s/Lačem/Lachem/g;  
 s/Leaderšip/Leadership/g;  
 s/LYNČ/LYNCH/g;  
 s/loćo/locco/g;  
 s/acintoš/acintosh/g;  
 s/mečanis/mechanis/g;  
 s/MACINTOŠ/MACINTOSH/g;  
 s/matčing/matching/g;  
 s/Maškilleyson/Mashkilleyson/g;  
 s/medwatč/medwatch/g;  
 s/Merčant/Merchant/g;  
 s/Mičele/Michele/g;  
 s/Munčen/Munchen/g;  
 s/Osterreič/Osterreich/g;  
 s/Paškova/Pashkova/g;  
 s/PUBLIŠED/PUBLISHED/g;  
 s/purčas/purchas/g;  
 s/Relaunč/Relaunch/g;  
 s/relaunč/relaunch/g;  
 s/rič/rich/g;  
 s/Ričter/Richter/g;  
 s/Ričard/Richard/g;  
 s/ritiš/ritish/g;  
 s/Roče/Roche/g;  
 s/Rytčik/Rytchik/g;  
 s/Savičeva/Savicheva/g;  
 s/Sčauer/Schauer/g;  
 s/Sčonwald/Schonwald/g;  
 s/sčeduling/scheduling/g;  
 s/sčen/schen/g;  
 s/Sč/Sch/g;  
 s/SČ/SCH/g;  
 s/Sčering/Schering/g;  
 s/Sčleswig/Schleswig/g;  
 s/Sčmidt/Schmidt/g;  
 s/SČMIDT/SCHMIDT/g;  
 s/SEARČ/SEARCH/g;  
 s/Searč/Search/g;  
 s/searč/search/g;  
 s/Stračounsky/Strachounsky/g;  
 s/šare/share/g;  
 s/šea/shea/g;  
 s/šell/shell/g;  
 s/šeet/sheet/g;  
 s/šema/shema/g;  
 s/ŠEMA/SHEMA/g;  
 s/šip/ship/g;  
 s/šodno/shodno/g;  
 s/šop/shop/g;  
 s/ŠORT/SHORT/g;  
 s/šort-term/short-term/g;  
 s/ šown / shown /g;  
 s/ šows / shows /g;  
 s/šridge/shridge/g;  
 s/švaća/shvaća/g;  
 s/švate/shvate/g;  
 s/Š;.GIF/SH;.GIF/g;  
 s/š;.html/sh;.html/g;  
 s/exčange/exchange/g;  
 s/SUĆESSFUL/SUCCESSFUL/g;  
 s/SUPERFREŠ/SUPERFRESH/g;  
 s/teač /teach /g;  
 s/tečniques/techniques/g;  
 s/ečnolog/echnolog/g;  
 s/tračomatis/trachomatis/g;  
 s/ućess/uccess/g;  
 s/Vaćines /Vaccines /g;  
 s/ whič / which /g;  
 s/Wašington/Washington/g;  
 s/Yamanouči/Yamanouchi/g;  
 s/ynč/ynch/g;  
 s/Zinner Š./Zinner SH./g;  
 s/Zinner Š/Zinner SH/g;  
 s/Zurič/Zurich/g;  
   
 # ovi idu uvijek na kraju  
 s/generich/generič/g;  
 s/išhođenje/ishođenje/g;  
 s/Jurichu /Juriču /g;  
 s/merichk/meričk/g;  
 s/Petrichi/Petriči/g;  
 s/Petrichevi/Petričevi/g;  
 s/prichuva/pričuva/g;  
 s/rašod/rashod/g;  
 s/Rašod/Rashod/g;  
 s/čosen/chosen/g;  
   
 s/iso\.č/iso\.ch/g;  
 s/medicorpteč\.com/medicorptech.com/g;  
 s/člorination/chlorination/g;  
 s/Tečnical/Technical/g;  
 s/Satiš Joši/Satish Joshi/g;  
 s/čloride/chloride/g;  
 s/Fisčer/Fischer/g;  
 s/ čain/ chain/g;  
 s/Hydričlorination/ Hydrichlorination/g;  
 s/Mannič/Mannich/g;  
 s/Flemiš/Flemish/g;  
   
 s/AREA ŠAPE=/AREA SHAPE=/g;  
 s/&Ecirc;/ć/g;  # hm?  
   
 s/Streptocoćus/Streptococcus/g;  
 s/Coći/Cocci/g;  
 s/ČPSG/CHPSG/g;  
   
 s/BENČMARKING/BENCHMARKING/g;  
 s/Benčmarking/Benchmarking/g;  
 s/Fišer/Fisher/g;  
 s/šeppard/sheppard/g;  
 s/Czeč/Czech/g;  
 s/Tošiba/Toshiba/g;  
 s/Marč/March/g;  
   
93  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.26