/[swish]/trunk/make_config.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 /trunk/make_config.pl

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

revision 33 by dpavlin, Sun May 4 01:31:31 2003 UTC revision 34 by dpavlin, Sun May 4 12:08:29 2003 UTC
# Line 9  use strict; Line 9  use strict;
9    
10  my $name = shift @ARGV;  my $name = shift @ARGV;
11  my $url = shift @ARGV;  my $url = shift @ARGV;
12  my $stripurl = shift @ARGV;  #my $stripurl = shift @ARGV;
13    my $stripurl;
14    my $title = join(" ",@ARGV);
15    
16  if (!$name || !$url) {  if (!$name || !$url) {
17          print "Usage: $0 name URL [strip from url]\n";          print "Usage: $0 name URL [strip from url] [optional title]\n";
18          exit;          exit;
19  }  }
20    
# Line 41  my $baseurl = $url; Line 43  my $baseurl = $url;
43  $baseurl =~ s#/[^/]+$#/#g;  $baseurl =~ s#/[^/]+$#/#g;
44    
45  print "Config name: $name\nCrawling url: $url [strip $stripurl]\n";  print "Config name: $name\nCrawling url: $url [strip $stripurl]\n";
46    print "Title: $title\n" if ($title);
47    
48    
49  my $config = <<"EOF";  my $config = <<"EOF";
# Line 71  my $xml = << "EOF"; Line 74  my $xml = << "EOF";
74          prog="/usr/bin/swish-e"          prog="/usr/bin/swish-e"
75          index="$dir/index/$name"          index="$dir/index/$name"
76          charset="iso-8859-2"          charset="iso-8859-2"
         title="$name search"  
77          affix="/usr/lib/ispell/american.aff"          affix="/usr/lib/ispell/american.aff"
78          url="$stripurl"  EOF
79    if ($title) {
80            $xml .= "\ttitle=\"$title\"\n";
81    } else {
82            $xml .= "\ttitle=\"$name search\"\n";
83    }
84    $xml .= "\turl=\"$stripurl\"\n" if ($stripurl);
85    $xml .= << "EOF";
86          >          >
87          <labels>          <labels>
88                  <label value="10"> 10</label>                  <label value="10"> 10</label>

Legend:
Removed from v.33  
changed lines
  Added in v.34

  ViewVC Help
Powered by ViewVC 1.1.26